diff options
author | Ian Bolton <ian.bolton@arm.com> | 2013-05-24 14:54:15 +0000 |
---|---|---|
committer | Ian Bolton <ibolton@gcc.gnu.org> | 2013-05-24 14:54:15 +0000 |
commit | 50d38551eeee9c225bd1af2e2a403de9ea298a7e (patch) | |
tree | f55d00c76bf19b868107c5a7a52d6b98e46974ce | |
parent | f746a029232cc3a74ba6281ab0a3dda4f2ab8a6e (diff) | |
download | gcc-50d38551eeee9c225bd1af2e2a403de9ea298a7e.zip gcc-50d38551eeee9c225bd1af2e2a403de9ea298a7e.tar.gz gcc-50d38551eeee9c225bd1af2e2a403de9ea298a7e.tar.bz2 |
AArch64 - allow insv_imm to handle bigger immediates via masking to 16 bits
From-SVN: r199293
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64.c | 4 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64.md | 5 |
3 files changed, 11 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dd36f0b..f607fdf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2013-05-24 Ian Bolton <ian.bolton@arm.com> + + * config/aarch64/aarch64.c (aarch64_print_operand): Change the + X format specifier to only display bottom 16 bits. + * config/aarch64/aarch64.md (insv_imm<mode>): Allow any size of + immediate to match for operand 2, since it will be masked. + 2013-05-24 Richard Biener <rguenther@suse.de> PR tree-optimization/57287 diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 12a7055..e580a1b 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -3428,13 +3428,13 @@ aarch64_print_operand (FILE *f, rtx x, char code) break; case 'X': - /* Print integer constant in hex. */ + /* Print bottom 16 bits of integer constant in hex. */ if (GET_CODE (x) != CONST_INT) { output_operand_lossage ("invalid operand for '%%%c'", code); return; } - asm_fprintf (f, "0x%wx", UINTVAL (x)); + asm_fprintf (f, "0x%wx", UINTVAL (x) & 0xffff); break; case 'w': diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index e1ec48f..2bdbfa9 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -858,9 +858,8 @@ (const_int 16) (match_operand:GPI 1 "const_int_operand" "n")) (match_operand:GPI 2 "const_int_operand" "n"))] - "INTVAL (operands[1]) < GET_MODE_BITSIZE (<MODE>mode) - && INTVAL (operands[1]) % 16 == 0 - && UINTVAL (operands[2]) <= 0xffff" + "UINTVAL (operands[1]) < GET_MODE_BITSIZE (<MODE>mode) + && UINTVAL (operands[1]) % 16 == 0" "movk\\t%<w>0, %X2, lsl %1" [(set_attr "v8type" "movk") (set_attr "mode" "<MODE>")] |