diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2005-07-10 16:54:01 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2005-07-10 16:54:01 +0000 |
commit | 28a9d8f5e472baeeffd915c1cb43be4dac1d979c (patch) | |
tree | 266cc05d9b96ed0d1c20d4c0436a4c0b3965890e | |
parent | f010abaa2b11934478d92c275c7bbc8bf925b46a (diff) | |
download | gdb-28a9d8f5e472baeeffd915c1cb43be4dac1d979c.zip gdb-28a9d8f5e472baeeffd915c1cb43be4dac1d979c.tar.gz gdb-28a9d8f5e472baeeffd915c1cb43be4dac1d979c.tar.bz2 |
gas/
2005-07-10 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (optimize_disp): Optimize signed 32bit
displacements.
testsuite/gas/
2005-07-10 H.J. Lu <hongjiu.lu@intel.com>
* i386/x86_64.s: Add absolute siged 32bit addressing tests for
mov.
* i386/x86_64.d: Updated.
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 5 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86_64.d | 16 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86_64.s | 18 |
5 files changed, 50 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 16f5072..70435ef 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2005-07-10 H.J. Lu <hongjiu.lu@intel.com> + + * config/tc-i386.c (optimize_disp): Optimize signed 32bit + displacements. + 2005-07-08 Ben Elliston <bje@au.ibm.com> * frags.h: Remove ANSI_PROTOTYPES conditional code. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 4b57194..f5c42df 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -2108,7 +2108,10 @@ optimize_disp () else if (flag_code == CODE_64BIT) { if (fits_in_signed_long (disp)) - i.types[op] |= Disp32S; + { + i.types[op] &= ~Disp64; + i.types[op] |= Disp32S; + } if (fits_in_unsigned_long (disp)) i.types[op] |= Disp32; } diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 5e3a1f0..052ea83 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2005-07-10 H.J. Lu <hongjiu.lu@intel.com> + + * i386/x86_64.s: Add absolute siged 32bit addressing tests for + mov. + * i386/x86_64.d: Updated. + 2005-07-08 Hans-Peter Nilsson <hp@axis.com> PR gas/1049 @@ -103,7 +109,7 @@ PR 1013 * i386/x86_64.s: Add absolute 64bit addressing tests for mov. - * i386/x86_64.s: Updated. + * i386/x86_64.d: Updated. 2005-06-17 Jan Beulich <jbeulich@novell.com> diff --git a/gas/testsuite/gas/i386/x86_64.d b/gas/testsuite/gas/i386/x86_64.d index 43b9132..2356570 100644 --- a/gas/testsuite/gas/i386/x86_64.d +++ b/gas/testsuite/gas/i386/x86_64.d @@ -140,4 +140,20 @@ Disassembly of section .text: 27e: 66 a3 11 22 33 44 55 66 77 88 mov[ ]+%ax,0x8877665544332211 288: a3 11 22 33 44 55 66 77 88 mov[ ]+%eax,0x8877665544332211 291: 48 a3 11 22 33 44 55 66 77 88 mov[ ]+%rax,0x8877665544332211 + 29b: 8a 04 25 11 22 33 ff mov[ ]+0xffffffffff332211,%al + 2a2: 66 8b 04 25 11 22 33 ff mov[ ]+0xffffffffff332211,%ax + 2aa: 8b 04 25 11 22 33 ff mov[ ]+0xffffffffff332211,%eax + 2b1: 48 8b 04 25 11 22 33 ff mov[ ]+0xffffffffff332211,%rax + 2b9: 88 04 25 11 22 33 ff mov[ ]+%al,0xffffffffff332211 + 2c0: 66 89 04 25 11 22 33 ff mov[ ]+%ax,0xffffffffff332211 + 2c8: 89 04 25 11 22 33 ff mov[ ]+%eax,0xffffffffff332211 + 2cf: 48 89 04 25 11 22 33 ff mov[ ]+%rax,0xffffffffff332211 + 2d7: 8a 04 25 11 22 33 ff mov[ ]+0xffffffffff332211,%al + 2de: 66 8b 04 25 11 22 33 ff mov[ ]+0xffffffffff332211,%ax + 2e6: 8b 04 25 11 22 33 ff mov[ ]+0xffffffffff332211,%eax + 2ed: 48 8b 04 25 11 22 33 ff mov[ ]+0xffffffffff332211,%rax + 2f5: 88 04 25 11 22 33 ff mov[ ]+%al,0xffffffffff332211 + 2fc: 66 89 04 25 11 22 33 ff mov[ ]+%ax,0xffffffffff332211 + 304: 89 04 25 11 22 33 ff mov[ ]+%eax,0xffffffffff332211 + 30b: 48 89 04 25 11 22 33 ff mov[ ]+%rax,0xffffffffff332211 #pass diff --git a/gas/testsuite/gas/i386/x86_64.s b/gas/testsuite/gas/i386/x86_64.s index 812007f..3e5532a 100644 --- a/gas/testsuite/gas/i386/x86_64.s +++ b/gas/testsuite/gas/i386/x86_64.s @@ -170,5 +170,23 @@ movw %ax,0x8877665544332211 movl %eax,0x8877665544332211 movq %rax,0x8877665544332211 +#absolute signed 32bit addressing +mov 0xffffffffff332211,%al +mov 0xffffffffff332211,%ax +mov 0xffffffffff332211,%eax +mov 0xffffffffff332211,%rax +mov %al,0xffffffffff332211 +mov %ax,0xffffffffff332211 +mov %eax,0xffffffffff332211 +mov %rax,0xffffffffff332211 +movb 0xffffffffff332211,%al +movw 0xffffffffff332211,%ax +movl 0xffffffffff332211,%eax +movq 0xffffffffff332211,%rax +movb %al,0xffffffffff332211 +movw %ax,0xffffffffff332211 +movl %eax,0xffffffffff332211 +movq %rax,0xffffffffff332211 + # Get a good alignment. .p2align 4,0 |