This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
re: PATCH i386 opcodes
- To: binutils at sourceware dot cygnus dot com
- Subject: re: PATCH i386 opcodes
- From: Gavin Romig-Koch <gavin at cygnus dot com>
- Date: Sat, 20 May 2000 10:05:07 -0400
> No. Just change the wl_suf on the existing pusha etc. to wld_suf, and
> make the appropriate #define (and #undef) for wld_suf
Ahh, yes, thank you. Foolish of me not to see this earlier. So,
like this: (OK to commit?)
-gavin...
* i386.h (wld_Suf): Define; undefine.
(pusha, popa, pushf, popf): Allow the 'd' suffix.
Index: i386.h
===================================================================
RCS file: /cvs/cvsfiles/devo/include/opcode/i386.h,v
retrieving revision 1.72
diff -c -p -r1.72 i386.h
*** i386.h 2000/04/28 13:36:19 1.72
--- i386.h 2000/05/20 13:58:13
*************** static const template i386_optab[] = {
*** 58,63 ****
--- 58,64 ----
#define bw_Suf (No_lSuf|No_sSuf|No_dSuf|No_xSuf)
#define bl_Suf (No_wSuf|No_sSuf|No_dSuf|No_xSuf)
#define wl_Suf (No_bSuf|No_sSuf|No_dSuf|No_xSuf)
+ #define wld_Suf (No_bSuf|No_sSuf|No_xSuf)
#define sl_Suf (No_bSuf|No_wSuf|No_dSuf|No_xSuf)
#define sld_Suf (No_bSuf|No_wSuf|No_xSuf)
#define sldx_Suf (No_bSuf|No_wSuf)
*************** static const template i386_optab[] = {
*** 121,127 ****
{"push", 1, 0x68, X, wl_Suf|DefaultSize, { Imm16|Imm32, 0, 0} },
{"push", 1, 0x06, X, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 0, 0 } },
{"push", 1, 0x0fa0, X, wl_Suf|Seg3ShortForm|DefaultSize, { SReg3, 0, 0 } },
! {"pusha", 0, 0x60, X, wl_Suf|DefaultSize, { 0, 0, 0 } },
/* Pop instructions. */
{"pop", 1, 0x58, X, wl_Suf|ShortForm|DefaultSize, { WordReg, 0, 0 } },
--- 122,128 ----
{"push", 1, 0x68, X, wl_Suf|DefaultSize, { Imm16|Imm32, 0, 0} },
{"push", 1, 0x06, X, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 0, 0 } },
{"push", 1, 0x0fa0, X, wl_Suf|Seg3ShortForm|DefaultSize, { SReg3, 0, 0 } },
! {"pusha", 0, 0x60, X, wld_Suf|DefaultSize, { 0, 0, 0 } },
/* Pop instructions. */
{"pop", 1, 0x58, X, wl_Suf|ShortForm|DefaultSize, { WordReg, 0, 0 } },
*************** static const template i386_optab[] = {
*** 129,135 ****
#define POP_SEG_SHORT 0x07
{"pop", 1, 0x07, X, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 0, 0 } },
{"pop", 1, 0x0fa1, X, wl_Suf|Seg3ShortForm|DefaultSize, { SReg3, 0, 0 } },
! {"popa", 0, 0x61, X, wl_Suf|DefaultSize, { 0, 0, 0 } },
/* Exchange instructions.
xchg commutes: we allow both operand orders. */
--- 130,136 ----
#define POP_SEG_SHORT 0x07
{"pop", 1, 0x07, X, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 0, 0 } },
{"pop", 1, 0x0fa1, X, wl_Suf|Seg3ShortForm|DefaultSize, { SReg3, 0, 0 } },
! {"popa", 0, 0x61, X, wld_Suf|DefaultSize, { 0, 0, 0 } },
/* Exchange instructions.
xchg commutes: we allow both operand orders. */
*************** static const template i386_optab[] = {
*** 166,173 ****
{"cmc", 0, 0xf5, X, NoSuf, { 0, 0, 0} },
{"lahf", 0, 0x9f, X, NoSuf, { 0, 0, 0} },
{"sahf", 0, 0x9e, X, NoSuf, { 0, 0, 0} },
! {"pushf", 0, 0x9c, X, wl_Suf|DefaultSize, { 0, 0, 0} },
! {"popf", 0, 0x9d, X, wl_Suf|DefaultSize, { 0, 0, 0} },
{"stc", 0, 0xf9, X, NoSuf, { 0, 0, 0} },
{"std", 0, 0xfd, X, NoSuf, { 0, 0, 0} },
{"sti", 0, 0xfb, X, NoSuf, { 0, 0, 0} },
--- 167,174 ----
{"cmc", 0, 0xf5, X, NoSuf, { 0, 0, 0} },
{"lahf", 0, 0x9f, X, NoSuf, { 0, 0, 0} },
{"sahf", 0, 0x9e, X, NoSuf, { 0, 0, 0} },
! {"pushf", 0, 0x9c, X, wld_Suf|DefaultSize, { 0, 0, 0} },
! {"popf", 0, 0x9d, X, wld_Suf|DefaultSize, { 0, 0, 0} },
{"stc", 0, 0xf9, X, NoSuf, { 0, 0, 0} },
{"std", 0, 0xfd, X, NoSuf, { 0, 0, 0} },
{"sti", 0, 0xfb, X, NoSuf, { 0, 0, 0} },
*************** static const template i386_optab[] = {
*** 1059,1064 ****
--- 1060,1066 ----
#undef bw_Suf
#undef bl_Suf
#undef wl_Suf
+ #undef wld_Suf
#undef sl_Suf
#undef sld_Suf
#undef sldx_Suf