mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
40fc1451c6
The MIPS assembly idiom 'move' now maps to the 'or' machine instruction. This change affects microMIPS, MIPS32, MIPS64. 2015-08-12 Simon Dardis <simon.dardis@imgtec.com> opcodes/ * micromips-opc.c (micromips_opcodes): Re-order table so that move based on 'or' is first. * mips-opc.c (mips_builtin_opcodes): Ditto. bfd/ * elfxx-mips.c (STUB_MOVE): Change to use 'or' only. (mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry, mips_n64_exec_plt0_entry, micromips_insn32_o32_exec_plt0_entry): Update to use 'or' instead of 'addu/daddu'. (_bfd_mips_elf_finish_dynamic_symbol): Update usage of STUB_MOVE. (move_insns_32): Reorder table. gas/ * config/tc-mips.c (move_register): Change to use 'or' only. (s_cpload, s_cpsetup, s_cprestore, s_cpreturn): Update to use or for move. gas/testsuite/ * gas/mips/elf-rel23.d: Update test. * gas/mips/elf-rel23.d: Ditto. * gas/mips/elf-rel23a.d: Ditto. * gas/mips/elf-rel23b.d: Ditto. * gas/mips/elf_e_flags1.d: Ditto. * gas/mips/elf_e_flags2.d: Ditto. * gas/mips/elf_e_flags3.d: Ditto. * gas/mips/elf_e_flags4.d: Ditto. * gas/mips/loc-swap-dis.d: Ditto. * gas/mips/micromips-insn32.d: Ditto. * gas/mips/micromips-noinsn32.d: Ditto. * gas/mips/micromips-trap.d: Ditto. * gas/mips/micromips.d: Ditto. * gas/mips/mips-abi32-pic.d: Ditto. * gas/mips/mips-abi32.d: Ditto. * gas/mips/mips-gp32-fp32-pic.d: Ditto. * gas/mips/mips-gp32-fp32.d: Ditto. * gas/mips/mips-gp32-fp64-pic.d: Ditto. * gas/mips/mips-gp32-fp64.d: Ditto. * gas/mips/mips-gp64-fp32-pic.d: Ditto. * gas/mips/mips-gp64-fp32.d: Ditto. * gas/mips/mips-gp64-fp64-pic.d: Ditto. * gas/mips/mips-gp64-fp64.d: Ditto. * gas/mips/mipsr6@loc-swap-dis.d: Ditto. * gas/mips/tls-o32.d: Ditto. * gas/mips/uld2-eb.d: Ditto. * gas/mips/uld2-el.d: Ditto. * gas/mips/ulw2-eb-ilocks.d: Ditto. * gas/mips/ulw2-eb.d: Ditto. * gas/mips/ulw2-el-ilocks.d: Ditto. * gas/mips/ulw2-el.d: Ditto. * gas/mips/move.d: New test. * gas/mips/move.s: Ditto. * gas/mips/micromips32-move.d: Ditto. * gas/mips/micromips32-move.s: Ditto. * gas/mips/mips.exp: Run the new tests. gold/ * mips.cc (plt0_entry_o32, plt0_entry_n32, plt0_entry_n64, lazy_stub_normal_1, lazy_stub_normal_1_n64, lazy_stub_normal_2, lazy_stub_normal_2_n64, lazy_stub_big, lazy_stub_big_n64, lazy_stub_micromips32_normal_1_n64, lazy_stub_micromips32_normal_2_n64, lazy_stub_micromips32_big, lazy_stub_micromips32_big_n64): Update to use 'or' for move instead of 'addu/daddu'. ld/testsuite/ * ld-mips-elf/compressed-plt-1-n32-mips16.od: Update test. * ld-mips-elf/compressed-plt-1-n32-umips.od: Ditto. * ld-mips-elf/compressed-plt-1-o32-mips16-got.od: Ditto. * ld-mips-elf/compressed-plt-1-o32-mips16-only.od: Ditto. * ld-mips-elf/compressed-plt-1-o32-mips16-word.od: Ditto. * ld-mips-elf/compressed-plt-1-o32-mips16.od: Ditto. * ld-mips-elf/compressed-plt-1-o32-se.od: Ditto. * ld-mips-elf/compressed-plt-1-o32-umips-got.od: Ditto. * ld-mips-elf/compressed-plt-1-o32-umips-word.od: Ditto. * ld-mips-elf/compressed-plt-1-o32-umips.od: Ditto. * ld-mips-elf/jalx-2.dd: Ditto. * ld-mips-elf/mips16-pic-3.dd: Ditto. * ld-mips-elf/pic-and-nonpic-3a.dd: Ditto. * ld-mips-elf/pic-and-nonpic-3b.dd: Ditto. * ld-mips-elf/pic-and-nonpic-5b.dd: Ditto. * ld-mips-elf/pic-and-nonpic-6-n32.dd: Ditto. * ld-mips-elf/pic-and-nonpic-6-o32.dd: Ditto. * ld-mips-elf/stub-dynsym-1-10000.d: Ditto. * ld-mips-elf/stub-dynsym-1-2fe80.d: Ditto. * ld-mips-elf/stub-dynsym-1-7fff.d: Ditto. * ld-mips-elf/stub-dynsym-1-8000.d: Ditto. * ld-mips-elf/stub-dynsym-1-fff0.d: Ditto. * ld-mips-elf/tlsbin-o32.d: Ditto. * ld-mips-elf/tlsdyn-o32-1.d: Ditto. * ld-mips-elf/tlsdyn-o32-2.d: Ditto. * ld-mips-elf/tlsdyn-o32-3.d: Ditto. * ld-mips-elf/tlsdyn-o32.d: Ditto. * ld-mips-elf/tlslib-o32.d: Ditto.
62 lines
1.7 KiB
Plaintext
62 lines
1.7 KiB
Plaintext
.*: +file format .*mips.*
|
|
|
|
Disassembly of section \.text:
|
|
|
|
04400000 <external_function>:
|
|
4400000: 27bdfff8 addiu sp,sp,-8
|
|
4400004: afbe0004 sw s8,4\(sp\)
|
|
4400008: 03a0f025 move s8,sp
|
|
440000c: 03c0e825 move sp,s8
|
|
4400010: 8fbe0004 lw s8,4\(sp\)
|
|
4400014: 27bd0008 addiu sp,sp,8
|
|
4400018: 03e00008 jr ra
|
|
440001c: 00000000 nop
|
|
|
|
04400020 <internal_function>:
|
|
4400020: 4fb0 addiu sp,sp,-8
|
|
4400022: cbc1 sw s8,4\(sp\)
|
|
4400024: 0fdd move s8,sp
|
|
4400026: 0fbe move sp,s8
|
|
4400028: 4bc1 lw s8,4\(sp\)
|
|
440002a: 4702 jraddiusp 8
|
|
|
|
0440002c <main>:
|
|
440002c: 4ff1 addiu sp,sp,-32
|
|
440002e: cbe7 sw ra,28\(sp\)
|
|
4400030: cbc6 sw s8,24\(sp\)
|
|
4400032: 0fdd move s8,sp
|
|
4400034: f89e 0020 sw a0,32\(s8\)
|
|
4400038: f8be 0024 sw a1,36\(s8\)
|
|
440003c: 41a2 0440 lui v0,0x440
|
|
4400040: 3082 0280 addiu a0,v0,640
|
|
4400044: f620 004c jal 4400098 <printf@micromipsplt>
|
|
4400048: 0000 0000 nop
|
|
440004c: f620 0010 jal 4400020 <internal_function>
|
|
4400050: 0000 0000 nop
|
|
4400054: f110 0000 jalx 4400000 <external_function>
|
|
4400058: 0000 0000 nop
|
|
440005c: 0fbe move sp,s8
|
|
440005e: 4be7 lw ra,28\(sp\)
|
|
4400060: 4bc6 lw s8,24\(sp\)
|
|
4400062: 4708 jraddiusp 32
|
|
\.\.\.
|
|
|
|
Disassembly of section \.plt:
|
|
|
|
04400080 <_PROCEDURE_LINKAGE_TABLE_>:
|
|
4400080: 7980 0012 addiu v1,\$pc,72
|
|
4400084: ff23 0000 lw t9,0\(v1\)
|
|
4400088: 0535 subu v0,v0,v1
|
|
440008a: 2525 srl v0,v0,2
|
|
440008c: 3302 fffe addiu t8,v0,-2
|
|
4400090: 0dff move t7,ra
|
|
4400092: 45f9 jalrs t9
|
|
4400094: 0f83 move gp,v1
|
|
4400096: 0c00 nop
|
|
|
|
04400098 <printf@micromipsplt>:
|
|
4400098: 7900 000e addiu v0,\$pc,56
|
|
440009c: ff22 0000 lw t9,0\(v0\)
|
|
44000a0: 4599 jr t9
|
|
44000a2: 0f02 move t8,v0
|