diff options
-rw-r--r-- | .readthedocs.yaml | 31 | ||||
-rw-r--r-- | Documentation/conf.py | 10 | ||||
-rw-r--r-- | Documentation/requirements.txt | 1 | ||||
-rw-r--r-- | linearize.c | 2 | ||||
-rw-r--r-- | simplify.c | 10 | ||||
-rw-r--r-- | target-riscv.c | 8 | ||||
-rw-r--r-- | target-xtensa.c | 2 | ||||
-rw-r--r-- | validation/linear/call-inline.c | 2 | ||||
-rw-r--r-- | validation/reassoc/bug-zephyr-63417.c | 13 |
9 files changed, 64 insertions, 15 deletions
diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..69f8f403 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,31 @@ +# Read the Docs configuration file for Sphinx projects +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + +# Build documentation in the "Documentation/" directory with Sphinx +sphinx: + configuration: Documentation/conf.py + # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs + # builder: "dirhtml" + # Fail on all warnings to avoid broken references + # fail_on_warning: true + +# Optionally build your docs in additional formats such as PDF and ePub +# formats: +# - pdf +# - epub + +# Optional but recommended, declare the Python requirements required +# to build your documentation +# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - requirements: Documentation/requirements.txt diff --git a/Documentation/conf.py b/Documentation/conf.py index affa9073..e3215b28 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -21,7 +21,7 @@ import datetime # -- General configuration ------------------------------------------------ -needs_sphinx = '1.7' +needs_sphinx = '1.8' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom @@ -78,7 +78,7 @@ highlight_language = 'none' # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = 'en' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -115,12 +115,6 @@ except: # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['sphinx/static'] -html_context = { - 'css_files': [ - '_static/theme_overrides.css', - ], -} - # Custom sidebar templates, must be a dictionary that maps document names # to template names. # diff --git a/Documentation/requirements.txt b/Documentation/requirements.txt new file mode 100644 index 00000000..02bf5657 --- /dev/null +++ b/Documentation/requirements.txt @@ -0,0 +1 @@ +recommonmark diff --git a/linearize.c b/linearize.c index d9aed61b..1db2d505 100644 --- a/linearize.c +++ b/linearize.c @@ -91,7 +91,7 @@ const char *show_label(struct basic_block *bb) if (!bb) return ".L???"; - snprintf(buf, 64, ".L%u", bb->nr); + snprintf(buf, 16, ".L%u", bb->nr); return buf; } @@ -1818,10 +1818,12 @@ static int simplify_associative_binop(struct instruction *insn) insn->src2 = eval_op(insn->opcode, insn->size, insn->src2, def->src2); return replace_pseudo(insn, &insn->src1, def->src1); } - if (!one_use(def->target)) - return 0; - switch_pseudo(def, &def->src1, insn, &insn->src2); - return REPEAT_CSE; + + if (!canonical_order(def->src1, insn->src2) && can_move_to(insn->src2, def)) { + // (x # y) # z -> (z # y) # x when x ≻ z + return switch_pseudo(def, &def->src1, insn, &insn->src2); + } + return 0; } static int simplify_add_one_side(struct instruction *insn, pseudo_t *p1, pseudo_t *p2) diff --git a/target-riscv.c b/target-riscv.c index 217ab7e8..7a184973 100644 --- a/target-riscv.c +++ b/target-riscv.c @@ -19,6 +19,8 @@ #define RISCV_GENERIC (RISCV_MUL|RISCV_DIV|RISCV_ATOMIC|RISCV_FPU) #define RISCV_ZICSR (1 << 10) #define RISCV_ZIFENCEI (1 << 11) +#define RISCV_ZICBOM (1 << 12) +#define RISCV_ZIHINTPAUSE (1 << 13) static unsigned int riscv_flags; @@ -41,6 +43,8 @@ static void parse_march_riscv(const char *arg) { "c", RISCV_COMP }, { "_zicsr", RISCV_ZICSR }, { "_zifencei", RISCV_ZIFENCEI }, + { "_zicbom", RISCV_ZICBOM }, + { "_zihintpause", RISCV_ZIHINTPAUSE }, }; int i; @@ -131,6 +135,10 @@ static void predefine_riscv(const struct target *self) predefine("__riscv_zicsr", 1, "1"); if (riscv_flags & RISCV_ZIFENCEI) predefine("__riscv_zifencei", 1, "1"); + if (riscv_flags & RISCV_ZICBOM) + predefine("__riscv_zicbom", 1, "1"); + if (riscv_flags & RISCV_ZIHINTPAUSE) + predefine("__riscv_zihintpause", 1, "1"); if (cmodel) predefine_strong("__riscv_cmodel_%s", cmodel); diff --git a/target-xtensa.c b/target-xtensa.c index 3620b4a3..48e4bf76 100644 --- a/target-xtensa.c +++ b/target-xtensa.c @@ -22,7 +22,7 @@ static void predefine_xtensa(const struct target *self) const struct target target_xtensa = { .mach = MACH_XTENSA, .bitness = ARCH_LP32, - .big_endian = true, + .big_endian = false, .bits_in_longdouble = 64, diff --git a/validation/linear/call-inline.c b/validation/linear/call-inline.c index 1ad785ee..0281e2d7 100644 --- a/validation/linear/call-inline.c +++ b/validation/linear/call-inline.c @@ -13,6 +13,6 @@ int i3(void) { return (***fun)(); } // C99,C11 6.5.3.2p4 * * check-output-ignore * check-output-excludes: load - * check-output-excludes: \\tcall + * check-output-excludes: ^.call * check-output-pattern(5): ret\\..* \\$42 */ diff --git a/validation/reassoc/bug-zephyr-63417.c b/validation/reassoc/bug-zephyr-63417.c new file mode 100644 index 00000000..5db821d3 --- /dev/null +++ b/validation/reassoc/bug-zephyr-63417.c @@ -0,0 +1,13 @@ +extern char __tdata_size[]; +extern char __tdata_align[]; + +unsigned long z_tls_data_size(void); +unsigned long z_tls_data_size(void) +{ + return ((unsigned long)__tdata_size) + ((unsigned long)__tdata_align - 1); +} + +/* + * check-name: bug-zephyr-63417 + * check-timeout: + */ |