OSDN Git Service
(root)
/
pf3gnuchains
/
pf3gnuchains4x.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9802491
)
gas/
author
Jan Beulich
<jbeulich@novell.com>
Wed, 26 Sep 2007 13:40:59 +0000
(13:40 +0000)
committer
Jan Beulich
<jbeulich@novell.com>
Wed, 26 Sep 2007 13:40:59 +0000
(13:40 +0000)
2007-09-26 Jan Beulich <jbeulich@novell.com>
* config/tc-i386.c (build_modrm_byte): Also check for RegEip
when considering IP-relative addressing.
gas/testsuite/
2007-09-26 Jan Beulich <jbeulich@novell.com>
* gas/i386/reloc64.s: Adjust for %eip-relative addressing no
longer generating errors.
* gas/i386/reloc64.d, gas/i386/reloc64.l: Update.
* gas/i386/x86-64-addr32.s: Remove explicit addr32 prefix
for %eip-realtive addressing case.
opcodes/
2007-09-26 Jan Beulich <jbeulich@novell.com>
* i386-opc.h (RegEip): Define.
(RegEiz): Adjust.
* i386-reg.tbl: Add eip. Mark rip and eip with RegRex64.
* i386-tbl.h: Re-generate.
gas/ChangeLog
patch
|
blob
|
history
gas/config/tc-i386.c
patch
|
blob
|
history
gas/testsuite/ChangeLog
patch
|
blob
|
history
gas/testsuite/gas/i386/reloc64.d
patch
|
blob
|
history
gas/testsuite/gas/i386/reloc64.l
patch
|
blob
|
history
gas/testsuite/gas/i386/reloc64.s
patch
|
blob
|
history
gas/testsuite/gas/i386/x86-64-addr32.s
patch
|
blob
|
history
opcodes/ChangeLog
patch
|
blob
|
history
opcodes/i386-opc.h
patch
|
blob
|
history
opcodes/i386-reg.tbl
patch
|
blob
|
history
opcodes/i386-tbl.h
patch
|
blob
|
history
diff --git
a/gas/ChangeLog
b/gas/ChangeLog
index
9cf0f71
..
4c02e1d
100644
(file)
--- a/
gas/ChangeLog
+++ b/
gas/ChangeLog
@@
-1,5
+1,10
@@
2007-09-26 Jan Beulich <jbeulich@novell.com>
2007-09-26 Jan Beulich <jbeulich@novell.com>
+ * config/tc-i386.c (build_modrm_byte): Also check for RegEip
+ when considering IP-relative addressing.
+
+2007-09-26 Jan Beulich <jbeulich@novell.com>
+
* config/tc-i386.h (md_register_arithmetic): Define.
* config/tc-ia64.h (md_register_arithmetic): Likewise.
* doc/internals.texi: Document md_register_arithmetic.
* config/tc-i386.h (md_register_arithmetic): Define.
* config/tc-ia64.h (md_register_arithmetic): Likewise.
* doc/internals.texi: Document md_register_arithmetic.
diff --git
a/gas/config/tc-i386.c
b/gas/config/tc-i386.c
index
9180adc
..
fd79330
100644
(file)
--- a/
gas/config/tc-i386.c
+++ b/
gas/config/tc-i386.c
@@
-4547,7
+4547,8
@@
build_modrm_byte (void)
}
}
/* RIP addressing for 64bit mode. */
}
}
/* RIP addressing for 64bit mode. */
- else if (i.base_reg->reg_num == RegRip)
+ else if (i.base_reg->reg_num == RegRip ||
+ i.base_reg->reg_num == RegEip)
{
i.rm.regmem = NO_BASE_REGISTER;
i.types[op].bitfield.disp8 = 0;
{
i.rm.regmem = NO_BASE_REGISTER;
i.types[op].bitfield.disp8 = 0;
@@
-5982,7
+5983,8
@@
i386_index_check (const char *operand_string)
|| (i.prefix[ADDR_PREFIX]
&& !i.base_reg->reg_type.bitfield.reg32))
&& (i.index_reg
|| (i.prefix[ADDR_PREFIX]
&& !i.base_reg->reg_type.bitfield.reg32))
&& (i.index_reg
- || i.base_reg->reg_num != RegRip))
+ || i.base_reg->reg_num !=
+ (i.prefix[ADDR_PREFIX] == 0 ? RegRip : RegEip)))
|| (i.index_reg
&& (!i.index_reg->reg_type.bitfield.baseindex
|| (i.prefix[ADDR_PREFIX] == 0
|| (i.index_reg
&& (!i.index_reg->reg_type.bitfield.baseindex
|| (i.prefix[ADDR_PREFIX] == 0
diff --git
a/gas/testsuite/ChangeLog
b/gas/testsuite/ChangeLog
index
b599228
..
fa69177
100644
(file)
--- a/
gas/testsuite/ChangeLog
+++ b/
gas/testsuite/ChangeLog
@@
-1,3
+1,11
@@
+2007-09-26 Jan Beulich <jbeulich@novell.com>
+
+ * gas/i386/reloc64.s: Adjust for %eip-relative addressing no
+ longer generating errors.
+ * gas/i386/reloc64.d, gas/i386/reloc64.l: Update.
+ * gas/i386/x86-64-addr32.s: Remove explicit addr32 prefix
+ for %eip-realtive addressing case.
+
2007-09-25 Nathan Sidwell <nathan@codesourcery.com>
* gas/m68k/br-isaa.d: Dump relocs too.
2007-09-25 Nathan Sidwell <nathan@codesourcery.com>
* gas/m68k/br-isaa.d: Dump relocs too.
diff --git
a/gas/testsuite/gas/i386/reloc64.d
b/gas/testsuite/gas/i386/reloc64.d
index
333deaa
..
5c14019
100644
(file)
--- a/
gas/testsuite/gas/i386/reloc64.d
+++ b/
gas/testsuite/gas/i386/reloc64.d
@@
-18,6
+18,7
@@
Disassembly of section \.text:
.*[ ]+R_X86_64_PC8[ ]+xtrn\+0x0*1
.*[ ]+R_X86_64_PC32[ ]+xtrn\+0xf+c
.*[ ]+R_X86_64_PC32[ ]+xtrn\+0xf+c
.*[ ]+R_X86_64_PC8[ ]+xtrn\+0x0*1
.*[ ]+R_X86_64_PC32[ ]+xtrn\+0xf+c
.*[ ]+R_X86_64_PC32[ ]+xtrn\+0xf+c
+.*[ ]+R_X86_64_PC32[ ]+xtrn\+0xf+c
.*[ ]+R_X86_64_PC8[ ]+xtrn\+0xf+f
.*[ ]+R_X86_64_GOT64[ ]+xtrn
.*[ ]+R_X86_64_GOT32[ ]+xtrn
.*[ ]+R_X86_64_PC8[ ]+xtrn\+0xf+f
.*[ ]+R_X86_64_GOT64[ ]+xtrn
.*[ ]+R_X86_64_GOT32[ ]+xtrn
@@
-28,6
+29,7
@@
Disassembly of section \.text:
.*[ ]+R_X86_64_GOTPCREL[ ]+xtrn\+0xf+c
.*[ ]+R_X86_64_GOTPC32[ ]+_GLOBAL_OFFSET_TABLE_\+0x0*2
.*[ ]+R_X86_64_GOTPC32[ ]+_GLOBAL_OFFSET_TABLE_\+0xf+c
.*[ ]+R_X86_64_GOTPCREL[ ]+xtrn\+0xf+c
.*[ ]+R_X86_64_GOTPC32[ ]+_GLOBAL_OFFSET_TABLE_\+0x0*2
.*[ ]+R_X86_64_GOTPC32[ ]+_GLOBAL_OFFSET_TABLE_\+0xf+c
+.*[ ]+R_X86_64_GOTPC32[ ]+_GLOBAL_OFFSET_TABLE_\+0xf+c
.*[ ]+R_X86_64_GOTPC32[ ]+_GLOBAL_OFFSET_TABLE_\+0x0*2
.*[ ]+R_X86_64_PLT32[ ]+xtrn
.*[ ]+R_X86_64_PLT32[ ]+xtrn
.*[ ]+R_X86_64_GOTPC32[ ]+_GLOBAL_OFFSET_TABLE_\+0x0*2
.*[ ]+R_X86_64_PLT32[ ]+xtrn
.*[ ]+R_X86_64_PLT32[ ]+xtrn
diff --git
a/gas/testsuite/gas/i386/reloc64.l
b/gas/testsuite/gas/i386/reloc64.l
index
87a5c77
..
ded5cab
100644
(file)
--- a/
gas/testsuite/gas/i386/reloc64.l
+++ b/
gas/testsuite/gas/i386/reloc64.l
@@
-1,5
+1,4
@@
.*: Assembler messages:
.*: Assembler messages:
-.*:29: Error: .*
.*:35: Error: .*
.*:36: Error: .*
.*:37: Error: .*
.*:35: Error: .*
.*:36: Error: .*
.*:37: Error: .*
@@
-17,7
+16,6
@@
.*:54: Error: .*
.*:55: Error: .*
.*:57: Error: .*
.*:54: Error: .*
.*:55: Error: .*
.*:57: Error: .*
-.*:66: Error: .*
.*:73: Error: .*
.*:75: Error: .*
.*:76: Error: .*
.*:73: Error: .*
.*:75: Error: .*
.*:76: Error: .*
diff --git
a/gas/testsuite/gas/i386/reloc64.s
b/gas/testsuite/gas/i386/reloc64.s
index
7fd741a
..
f12271d
100644
(file)
--- a/
gas/testsuite/gas/i386/reloc64.s
+++ b/
gas/testsuite/gas/i386/reloc64.s
@@
-26,7
+26,7
@@
ill mov $(xtrn - .), %eax
mov $(xtrn - .), %ax
mov $(xtrn - .), %al
mov xtrn(%rip), %eax
mov $(xtrn - .), %ax
mov $(xtrn - .), %al
mov xtrn(%rip), %eax
-
bad
mov xtrn(%eip), %eax
+
mov xtrn(%eip), %eax
call xtrn
jrcxz xtrn
call xtrn
jrcxz xtrn
@@
-62,8
+62,8
@@
ill movabs $_GLOBAL_OFFSET_TABLE_, %rax
ill add $_GLOBAL_OFFSET_TABLE_, %eax
ill add $_GLOBAL_OFFSET_TABLE_, %ax
ill add $_GLOBAL_OFFSET_TABLE_, %al
ill add $_GLOBAL_OFFSET_TABLE_, %eax
ill add $_GLOBAL_OFFSET_TABLE_, %ax
ill add $_GLOBAL_OFFSET_TABLE_, %al
- lea _GLOBAL_OFFSET_TABLE_(%rip), %rax
#???
-
bad
lea _GLOBAL_OFFSET_TABLE_(%eip), %rax
+ lea _GLOBAL_OFFSET_TABLE_(%rip), %rax
+
lea _GLOBAL_OFFSET_TABLE_(%eip), %rax
ill movabs $(_GLOBAL_OFFSET_TABLE_ - .), %rax
add $(_GLOBAL_OFFSET_TABLE_ - .), %rax
ill add $(_GLOBAL_OFFSET_TABLE_ - .), %eax
ill movabs $(_GLOBAL_OFFSET_TABLE_ - .), %rax
add $(_GLOBAL_OFFSET_TABLE_ - .), %rax
ill add $(_GLOBAL_OFFSET_TABLE_ - .), %eax
diff --git
a/gas/testsuite/gas/i386/x86-64-addr32.s
b/gas/testsuite/gas/i386/x86-64-addr32.s
index
c32525f
..
889c5fd
100644
(file)
--- a/
gas/testsuite/gas/i386/x86-64-addr32.s
+++ b/
gas/testsuite/gas/i386/x86-64-addr32.s
@@
-1,7
+1,7
@@
.text
lea symbol(%eax), %rax
lea symbol(%r8d), %rax
.text
lea symbol(%eax), %rax
lea symbol(%r8d), %rax
-
addr32 lea symbol(%r
ip), %rax
+
lea symbol(%e
ip), %rax
addr32 lea symbol, %rax
addr32 mov 0x600898,%al
addr32 mov 0x600898,%ax
addr32 lea symbol, %rax
addr32 mov 0x600898,%al
addr32 mov 0x600898,%ax
diff --git
a/opcodes/ChangeLog
b/opcodes/ChangeLog
index
add8f6a
..
cada410
100644
(file)
--- a/
opcodes/ChangeLog
+++ b/
opcodes/ChangeLog
@@
-1,3
+1,10
@@
+2007-09-26 Jan Beulich <jbeulich@novell.com>
+
+ * i386-opc.h (RegEip): Define.
+ (RegEiz): Adjust.
+ * i386-reg.tbl: Add eip. Mark rip and eip with RegRex64.
+ * i386-tbl.h: Re-generate.
+
2007-09-25 H.J. Lu <hongjiu.lu@intel.com>
* i386-gen.c (process_i386_opcodes): Process opcode_length.
2007-09-25 H.J. Lu <hongjiu.lu@intel.com>
* i386-gen.c (process_i386_opcodes): Process opcode_length.
diff --git
a/opcodes/i386-opc.h
b/opcodes/i386-opc.h
index
b052e81
..
2f6e5b3
100644
(file)
--- a/
opcodes/i386-opc.h
+++ b/
opcodes/i386-opc.h
@@
-447,8
+447,9
@@
typedef struct
#define RegRex64 0x2 /* Extended 8 bit register. */
unsigned int reg_num;
#define RegRip ((unsigned int ) ~0)
#define RegRex64 0x2 /* Extended 8 bit register. */
unsigned int reg_num;
#define RegRip ((unsigned int ) ~0)
+#define RegEip (RegRip - 1)
/* EIZ and RIZ are fake index registers. */
/* EIZ and RIZ are fake index registers. */
-#define RegEiz (Reg
R
ip - 1)
+#define RegEiz (Reg
E
ip - 1)
#define RegRiz (RegEiz - 1)
}
reg_entry;
#define RegRiz (RegEiz - 1)
}
reg_entry;
diff --git
a/opcodes/i386-reg.tbl
b/opcodes/i386-reg.tbl
index
373aba7
..
4a86cff
100644
(file)
--- a/
opcodes/i386-reg.tbl
+++ b/
opcodes/i386-reg.tbl
@@
-187,9
+187,10
@@
xmm12, RegXMM, RegRex, 4
xmm13, RegXMM, RegRex, 5
xmm14, RegXMM, RegRex, 6
xmm15, RegXMM, RegRex, 7
xmm13, RegXMM, RegRex, 5
xmm14, RegXMM, RegRex, 6
xmm15, RegXMM, RegRex, 7
-// No type will make this register rejected for all purposes except
-// for addressing. This saves creating one extra type for RIP.
-rip, BaseIndex, 0, RegRip
+// No type will make these registers rejected for all purposes except
+// for addressing. This saves creating one extra type for RIP/EIP.
+rip, BaseIndex, RegRex64, RegRip
+eip, BaseIndex, RegRex64, RegEip
// No type will make these registers rejected for all purposes except
// for addressing.
eiz, BaseIndex, 0, RegEiz
// No type will make these registers rejected for all purposes except
// for addressing.
eiz, BaseIndex, 0, RegEiz
diff --git
a/opcodes/i386-tbl.h
b/opcodes/i386-tbl.h
index
9927bf9
..
5926fb8
100644
(file)
--- a/
opcodes/i386-tbl.h
+++ b/
opcodes/i386-tbl.h
@@
-13278,7
+13278,11
@@
const reg_entry i386_regtab[] =
{ "rip",
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
{ "rip",
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
- 0, RegRip },
+ RegRex64, RegRip },
+ { "eip",
+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
+ RegRex64, RegEip },
{ "eiz",
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
{ "eiz",
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },