diff --git a/contrib/binutils/gas/config/tc-i386.c b/contrib/binutils/gas/config/tc-i386.c index 9227a2df67cb..9188dd5031bf 100644 --- a/contrib/binutils/gas/config/tc-i386.c +++ b/contrib/binutils/gas/config/tc-i386.c @@ -1907,19 +1907,6 @@ md_assemble (line) } } - if (i.reg_operands && flag_code < CODE_64BIT) - { - int op; - for (op = i.operands; --op >= 0;) - if ((i.types[op] & Reg) - && (i.op[op].regs->reg_flags & (RegRex64|RegRex))) - { - as_bad (_("Extended register `%%%s' available only in 64bit mode."), - i.op[op].regs->reg_name); - return; - } - } - /* If matched instruction specifies an explicit instruction mnemonic suffix, use it. */ if (i.tm.opcode_modifier & (Size16 | Size32 | Size64)) @@ -4485,6 +4472,13 @@ parse_register (reg_string, end_op) } } + if (r != NULL + && r->reg_flags & (RegRex64|RegRex) + && flag_code != CODE_64BIT) + { + return (const reg_entry *) NULL; + } + return r; } diff --git a/contrib/binutils/ld/configure.tgt b/contrib/binutils/ld/configure.tgt index 046110034317..a0a1526e50c9 100644 --- a/contrib/binutils/ld/configure.tgt +++ b/contrib/binutils/ld/configure.tgt @@ -124,8 +124,9 @@ i[3456]86-*-sco*) targ_emul=i386coff ;; i[3456]86-*-isc*) targ_emul=i386coff ;; i[3456]86-*-lynxos*) targ_emul=i386lynx ;; i[3456]86-*-coff) targ_emul=i386coff ;; +i[3456]86-*-rtemscoff*) targ_emul=i386coff ;; i[3456]86-*-rtemself*) targ_emul=elf_i386 ;; -i[3456]86-*-rtems*) targ_emul=i386coff ;; +i[3456]86-*-rtems*) targ_emul=elf_i386 ;; i[3456]86-*-bsd) targ_emul=i386bsd ;; i[3456]86-*-bsd386) targ_emul=i386bsd ;; i[3456]86-*-bsdi*) targ_emul=i386bsd ;; @@ -249,7 +250,8 @@ m68*-*-lynxos*) targ_emul=m68klynx ;; m68*-hp*-netbsd*) targ_emul=m68k4knbsd ;; m68*-*-netbsd*) targ_emul=m68knbsd ;; m68*-*-psos*) targ_emul=m68kpsos ;; -m68*-*-rtems*) targ_emul=m68kcoff ;; +m68*-*-rtemscoff*) targ_emul=m68kcoff ;; +m68*-*-rtems*) targ_emul=m68kelf ;; hppa*64*-*-linux-gnu*) targ_emul=hppa64linux ;; hppa*64*-*) targ_emul=elf64hppa ;; hppa*-*-linux-gnu*) targ_emul=hppalinux ;;