diff options
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 4 | ||||
-rw-r--r-- | gas/config/tc-microblaze.c | 18 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/microblaze/allinsn.d | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/microblaze/allinsn.s | 8 |
5 files changed, 42 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index a3a33d8..f1e6207 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2012-11-14 David Holsgrove <david.holsgrove@xilinx.com> + + * config/tc-microblaze.c (md_assemble): Add support for INST_TYPE_IMM5 + 2012-11-14 Ulrich Weigand <uweigand@de.ibm.com> * config/tc-ppc.c (md_apply_fix): Leave field zero when emitting diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c index 04dfa1e..b71383b 100644 --- a/gas/config/tc-microblaze.c +++ b/gas/config/tc-microblaze.c @@ -1605,6 +1605,24 @@ md_assemble (char * str) output = frag_more (isize); break; + case INST_TYPE_IMM5: + if (strcmp(op_end, "")) + op_end = parse_imm (op_end + 1, & exp, MIN_IMM5, MAX_IMM5); + else + as_fatal(_("Error in statement syntax")); + if (exp.X_op != O_constant) { + as_warn(_("Symbol used as immediate for mbar instruction")); + } else { + output = frag_more (isize); + immed = exp.X_add_number; + } + if (immed != (immed % 32)) { + as_warn(_("Immediate value for mbar > 32. using <value %% 32>")); + immed = immed % 32; + } + inst |= (immed << IMM_MBAR); + break; + default: as_fatal (_("unimplemented opcode \"%s\""), name); } diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index c2a66c8..51405aa 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,4 +1,9 @@ -2012-11-08 David Holsgrove <david.holsgrove@xilinx.com> +2012-11-14 David Holsgrove <david.holsgrove@xilinx.com> + + * gas/microblaze/allinsn.s: Add mbar and sleep + * gas/microblaze/allinsn.d: Likewise + +2012-11-14 David Holsgrove <david.holsgrove@xilinx.com> * gas/microblaze/allinsn.s: Add clz insn * gas/microblaze/allinsn.d: Likewise diff --git a/gas/testsuite/gas/microblaze/allinsn.d b/gas/testsuite/gas/microblaze/allinsn.d index c7854f1..ec14020 100644 --- a/gas/testsuite/gas/microblaze/allinsn.d +++ b/gas/testsuite/gas/microblaze/allinsn.d @@ -25,3 +25,9 @@ Disassembly of section .text: 00000018 <clz>: 18: 900000e0 clz r0, r0 + +0000001c <mbar>: + 1c: b8420004 mbar 2 + +00000020 <sleep>: + 20: ba020004 sleep diff --git a/gas/testsuite/gas/microblaze/allinsn.s b/gas/testsuite/gas/microblaze/allinsn.s index 0e4271d..582da17 100644 --- a/gas/testsuite/gas/microblaze/allinsn.s +++ b/gas/testsuite/gas/microblaze/allinsn.s @@ -28,4 +28,12 @@ swr: .global clz clz: clz r0,r0 + .text + .global mbar +mbar: + mbar 2 + .text + .global sleep +sleep: + sleep |