diff options
author | Spencer E. Olson <olsonse@umich.edu> | 2020-11-09 12:41:09 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2020-11-09 12:41:09 +0000 |
commit | 9372689d72f902c8bae90536acc4747fb0a4b1e1 (patch) | |
tree | b6ec12b88ad28b41ba92f290df2cb10531ad7614 /gas | |
parent | 4a3e3e228280ebbd6320743c1bc2f1401e70300c (diff) | |
download | gdb-9372689d72f902c8bae90536acc4747fb0a4b1e1.zip gdb-9372689d72f902c8bae90536acc4747fb0a4b1e1.tar.gz gdb-9372689d72f902c8bae90536acc4747fb0a4b1e1.tar.bz2 |
Add support for the LMBD (left-most bit detect) instruction to the PRU assembler.
include * opcode/pru.h: Add LMBD (left-most bit detect) opcode index
opcodes * pru-opc.c: Add opcode description for LMBD (left-most bit detect)
gas * testsuite/gas/pru/misc.s: Add tests for lmbd (left-most bit detect)
* testsuite/gas/pru/misc.d: Add tests for lmbd (left-most bit
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/pru/misc.d | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/pru/misc.s | 3 | ||||
-rw-r--r-- | gas/write.c | 24 |
4 files changed, 36 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 3c3ce6e6a..d0ed87a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2020-11-09 Spencer E. Olson <olsonse@umich.edu> + + * testsuite/gas/pru/misc.s: Add tests for lmbd (left-most bit + detect). + * testsuite/gas/pru/misc.d: Update expected disassembly. + 2020-11-09 Przemyslaw Wirkus <przemyslaw.wirkus@arm.com> * config/tc-aarch64.c: Fix comment. diff --git a/gas/testsuite/gas/pru/misc.d b/gas/testsuite/gas/pru/misc.d index 7c791e6..ac778db 100644 --- a/gas/testsuite/gas/pru/misc.d +++ b/gas/testsuite/gas/pru/misc.d @@ -9,3 +9,6 @@ Disassembly of section .text: 0+0000 <[^>]*> 2a000000 halt 0+0004 <[^>]*> 3e800000 slp 1 0+0008 <[^>]*> 3e000000 slp 0 +0+000c <[^>]*> 2701e1e0 lmbd r0, r1, 1 +0+0010 <[^>]*> 2700e100 lmbd r0.b0, r1, 0 +0+0014 <[^>]*> 2642e1e0 lmbd r0, r1, sp.b2 diff --git a/gas/testsuite/gas/pru/misc.s b/gas/testsuite/gas/pru/misc.s index cfe4d88..42e08a7 100644 --- a/gas/testsuite/gas/pru/misc.s +++ b/gas/testsuite/gas/pru/misc.s @@ -4,3 +4,6 @@ foo: halt slp 1 slp 0 + lmbd r0, r1, 0x1 + lmbd r0.b0, r1, 0x0 + lmbd r0, r1, r2.b2 diff --git a/gas/write.c b/gas/write.c index 054f279..36fc404 100644 --- a/gas/write.c +++ b/gas/write.c @@ -771,6 +771,22 @@ resolve_reloc_expr_symbols (void) } } +static bfd_boolean +is_dwo_section (asection *sec) +{ + const char *name; + int len; + + if (sec == NULL || (name = bfd_section_name (sec)) == NULL) + return FALSE; + + len = strlen (name); + if (len < 5) + return FALSE; + + return strncmp (name + len - 4, ".dwo", 4) == 0; +} + /* This pass over fixups decides whether symbols can be replaced with section symbols. */ @@ -899,6 +915,14 @@ adjust_reloc_syms (bfd *abfd ATTRIBUTE_UNUSED, #endif } + /* PR 26841: DWO sections are not supposed to have relocations. */ + if (is_dwo_section (sec) && seginfo->fix_root != NULL) + { + as_bad (_("DWO section '%s' contains unresolved expressions - this is not allowed"), + bfd_section_name (sec)); + seginfo->fix_root = NULL; /* FIXME: Memory leak ? */ + } + dump_section_relocs (abfd, sec, stderr); } |