mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
3342be5dab
This matches the ISA specification. This also adds two tests: one to make sure the assembler rejects invalid 'c.lui's, and one to make sure we only relax valid 'c.lui's. bfd/ChangeLog 2017-10-24 Andrew Waterman <andrew@sifive.com> * elfnn-riscv.c (_bfd_riscv_relax_lui): Don't relax to c.lui when rd is x0. include/ChangeLog 2017-10-24 Andrew Waterman <andrew@sifive.com> * opcode/riscv.h (VALID_RVC_LUI_IMM): c.lui can't load the immediate 0. gas/ChangeLog 2017-10-24 Andrew Waterman <andrew@sifive.com> * testsuite/gas/riscv/c-lui-fail.d: New testcase. gas/testsuite/gas/riscv/c-lui-fail.l: Likewise. gas/testsuite/gas/riscv/c-lui-fail.s: Likewise. gas/testsuite/gas/riscv/riscv.exp: Likewise. ld/ChangeLog 2017-10-24 Andrew Waterman <andrew@sifive.com> * ld/testsuite/ld-riscv-elf/c-lui.d: New testcase. ld/testsuite/ld-riscv-elf/c-lui.s: Likewise. ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp: New test suite.
18 lines
345 B
Makefile
18 lines
345 B
Makefile
#name: lui to c.lui relaxation
|
|
#source: c-lui.s
|
|
#as: -march=rv32ic
|
|
#ld: -shared -melf32lriscv
|
|
#objdump: -d -M no-aliases,numeric
|
|
|
|
.*: file format .*
|
|
|
|
|
|
Disassembly of section \.text:
|
|
|
|
.* <.text>:
|
|
.*: 6085 c.lui x1,0x1
|
|
.*: 000000b7 lui x1,0x0
|
|
.*: 00001037 lui x0,0x1
|
|
.*: 00001137 lui x2,0x1
|
|
#pass
|