[PATCH] Add aliases instructions BHS and BLO.

John Darrington john@darrington.wattle.id.au
Wed Nov 21 07:25:00 GMT 2018


Ping!

On Sun, Nov 11, 2018 at 06:33:26PM +0100, John Darrington wrote:
     These are documented by NXP as alternative mnemonics for BCC and BCS
     respectively.
     
     gas/ChangeLog:
     
     2018-11-11   John Darrington <john@darrington.wattle.id.au>
     
             * config/tc-s12z.c (opcodes): bhs, blo: New members.
     	* testsuite/gas/s12z/bra.d: Add tests for aliases.
     	* testsuite/gas/s12z/bra.s: Add tests for aliases.
     ---
      gas/config/tc-s12z.c         | 2 ++
      gas/testsuite/gas/s12z/bra.d | 6 ++++--
      gas/testsuite/gas/s12z/bra.s | 2 ++
      3 files changed, 8 insertions(+), 2 deletions(-)
     
     diff --git a/gas/config/tc-s12z.c b/gas/config/tc-s12z.c
     index 9df86432a5..10f7976582 100644
     --- a/gas/config/tc-s12z.c
     +++ b/gas/config/tc-s12z.c
     @@ -3142,7 +3142,9 @@ static const struct instruction opcodes[] = {
        {"bhi", 1,   0x22,  rel, 0},
        {"bls", 1,   0x23,  rel, 0},
        {"bcc", 1,   0x24,  rel, 0},
     +  {"bhs", 1,   0x24,  rel, 0}, /* Alias for bcc */
        {"bcs", 1,   0x25,  rel, 0},
     +  {"blo", 1,   0x25,  rel, 0}, /* Alias for bcs */
        {"bne", 1,   0x26,  rel, 0},
        {"beq", 1,   0x27,  rel, 0},
        {"bvc", 1,   0x28,  rel, 0},
     diff --git a/gas/testsuite/gas/s12z/bra.d b/gas/testsuite/gas/s12z/bra.d
     index bc3d3595ca..0fae3ece7b 100644
     --- a/gas/testsuite/gas/s12z/bra.d
     +++ b/gas/testsuite/gas/s12z/bra.d
     @@ -30,5 +30,7 @@ Disassembly of section .text:
        27:	2d ff e8    	blt L4
        2a:	2e ff df    	bgt L3
        2d:	2f ff d3    	ble L1
     -  30:	20 02       	bra \*\+2
     -  32:	20 7c       	bra \*-4
     +  30:	24 ff d3    	bcc L2
     +  33:	25 ff d0    	bcs L2
     +  36:	20 02       	bra \*\+2
     +  38:	20 7c       	bra \*-4
     diff --git a/gas/testsuite/gas/s12z/bra.s b/gas/testsuite/gas/s12z/bra.s
     index a2528b39df..c611a25519 100644
     --- a/gas/testsuite/gas/s12z/bra.s
     +++ b/gas/testsuite/gas/s12z/bra.s
     @@ -14,6 +14,8 @@ L4:	bcs L2
      	blt L4
      	bgt L3
      	ble L1
     +	bhs L2
     +	blo L2
      
      	bra *+2
      	bra *-4
     -- 
     2.11.0

-- 
Avoid eavesdropping.  Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.



More information about the Binutils mailing list