[PATCH 6/6] x86/MPX: bndmk, bndldx, and bndstx don't allow RIP-relative addressing
Jan Beulich
JBeulich@suse.com
Tue Oct 8 14:44:00 GMT 2013
More information about the Binutils mailing list
Tue Oct 8 14:44:00 GMT 2013
- Previous message (by thread): [PATCH 5/6] x86/MPX: fix operand size handling
- Next message (by thread): [PATCH 6/6] x86/MPX: bndmk, bndldx, and bndstx don't allow RIP-relative addressing
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
gas/ 2013-10-08 Jan Beulich <jbeulich@suse.com> * tc-i386.c (i386_index_check): Reject RIP-relative addressing for bndmk, bndldx, and bndstx. Warn about register scaling by other than 1 for bndldx and bndstx. --- 2013-10-07/gas/config/tc-i386.c +++ 2013-10-07/gas/config/tc-i386.c @@ -8360,6 +8375,25 @@ bad_address: || i.index_reg->reg_num == RegEiz)) || !i.index_reg->reg_type.bitfield.baseindex))) goto bad_address; + + /* bndmk, bndldx, and bndstx have special restrictions. */ + if (current_templates->start->base_opcode == 0xf30f1b + || (current_templates->start->base_opcode & ~1) == 0x0f1a) + { + /* They cannot use RIP-relative addressing. */ + if (i.base_reg + && i.base_reg->reg_num == (addr_mode == CODE_64BIT ? RegRip + : RegEip)) + { + as_bad (_("`%s' cannot be used here"), operand_string); + return 0; + } + + /* bndldx and bndstx ignore their scale factor. */ + if (current_templates->start->base_opcode != 0xf30f1b + && i.log2_scale_factor) + as_warn (_("register scaling is being ignored here")); + } } else { -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: binutils-mainline-x86-MPX-RIP-rel.patch URL: <https://sourceware.org/pipermail/binutils/attachments/20131008/6af14758/attachment.ksh>
- Previous message (by thread): [PATCH 5/6] x86/MPX: fix operand size handling
- Next message (by thread): [PATCH 6/6] x86/MPX: bndmk, bndldx, and bndstx don't allow RIP-relative addressing
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list