Closed
Description
The arc-regs.h suggests that for the build config register in arc600 family, value 0xc1
is used. However, the ARC_OPCODE_ALL
(?) must use 0xc2
.
DEF (0xc1, ARC_OPCODE_ARC600, NONE, arc600_build_config)
DEF (0xc2, ARC_OPCODE_ARCALL, NONE, isa_config)
This is not correct, as checking against mwdt
reveals.
$ cat isa_config.S
lr r0, [isa_config]
---------------------- [ arcv2 built by mwdt ]------------------------
$ asac -arcv2hs isa_config.S -o isa_config.o
MetaWare ELF Dumper ENG-2020.09-007 (build TIP-24-Jul-2020)
$ elfdump -T isa_config.o
Dump of "isa_config.o":
Content of section .text (#1) size=0x4 start=0x34
0: 20aa0043 lr %r0,[%isa_config]
$ arc-elf32-objdump -dr isa_config.o
isa_config.o: file format elf32-littlearc
Disassembly of section .text:
00000000 <$t>:
0: 20aa 0043 lr r0,[193] # 0xc1
---------------------- [ arc600 built by mwdt ]-----------------------
$ asac -arc600 isa_config.S -o isa_config.o
MetaWare ARC Assembler ENG-2020.09-007 (build TIP-24-Jul-2020)
"isa_config.S",Line 1: warning (#113) Register isa_config is not
supported in the ARC600 processor family
$ elfdump -T isa_config.o
Dump of "isa_config.o":
Content of section .text (#1) size=0x4 start=0x34
0: 20aa0043 lr %r0,[%arc600_build_config]
$ arc-elf32-objdump -dr isa_config.o
isa_config.o: file format elf32-littlearc
Disassembly of section .text:
00000000 <$t>:
0: 20aa 0043 lr r0,[193] # 0xc1
---------------------- [ arcv2 built by gnu ]-------------------------
$ arc-elf32-gcc -mcpu=archs -c isa_config.S -o isa_config.o
$ elfdump -T isa_config.o
Dump of "isa_config.o":
Content of section .text (#1) size=0x4 start=0x34
0: 20aa0083 lr %r0,[0xc2]
$ arc-elf32-objdump -dr isa_config.o
isa_config.o: file format elf32-littlearc
Disassembly of section .text:
00000000 <$t>:
0: 20aa 0083 lr r0,[isa_config]
---------------------- [ arc600 built by gnu ]------------------------
$ arc-elf32-gcc -mcpu=arc600 -c isa_config.S -o isa_config.o
$ elfdump -T isa_config.o
Dump of "isa_config.o":
Content of section .text (#1) size=0x4 start=0x34
0: 20aa0083 lr %r0,[0xc2]
$ arc-elf32-objdump -dr isa_config.o
isa_config.o: file format elf32-littlearc
Disassembly of section .text:
00000000 <$t>:
0: 20aa 0083 lr r0,[isa_config]
----------------------------------------------------------------------