X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=opcodes%2Fmips-formats.h;h=ac73f060a3eaaa4a43f0cf17be94614c1f8bb554;hb=151da91724c50b9c501b4b89857e675bc2dd8b52;hp=dc7bfdda22e287107a06a8078e4327276e1ef5b1;hpb=b90efa5b79ac1524ec260f8eb89d1be37e0219a7;p=binutils-gdb.git diff --git a/opcodes/mips-formats.h b/opcodes/mips-formats.h index dc7bfdda22e..ac73f060a3e 100644 --- a/opcodes/mips-formats.h +++ b/opcodes/mips-formats.h @@ -1,5 +1,5 @@ /* mips-formats.h - Copyright (C) 2013-2015 Free Software Foundation, Inc. + Copyright (C) 2013-2023 Free Software Foundation, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,27 +18,30 @@ /* For ARRAY_SIZE. */ #include "libiberty.h" -#define INT_ADJ(SIZE, LSB, MAX_VAL, SHIFT, PRINT_HEX) \ +#define INT_BIAS(SIZE, LSB, MAX_VAL, BIAS, SHIFT, PRINT_HEX) \ { \ static const struct mips_int_operand op = { \ - { OP_INT, SIZE, LSB }, MAX_VAL, 0, SHIFT, PRINT_HEX \ + { OP_INT, SIZE, LSB }, MAX_VAL, BIAS, SHIFT, PRINT_HEX \ }; \ return &op.root; \ } +#define INT_ADJ(SIZE, LSB, MAX_VAL, SHIFT, PRINT_HEX) \ + INT_BIAS(SIZE, LSB, MAX_VAL, 0, SHIFT, PRINT_HEX) + #define UINT(SIZE, LSB) \ - INT_ADJ(SIZE, LSB, (1 << (SIZE)) - 1, 0, FALSE) + INT_ADJ(SIZE, LSB, (1 << (SIZE)) - 1, 0, false) #define SINT(SIZE, LSB) \ - INT_ADJ(SIZE, LSB, (1 << ((SIZE) - 1)) - 1, 0, FALSE) + INT_ADJ(SIZE, LSB, (1 << ((SIZE) - 1)) - 1, 0, false) #define HINT(SIZE, LSB) \ - INT_ADJ(SIZE, LSB, (1 << (SIZE)) - 1, 0, TRUE) + INT_ADJ(SIZE, LSB, (1 << (SIZE)) - 1, 0, true) #define BIT(SIZE, LSB, BIAS) \ { \ static const struct mips_int_operand op = { \ - { OP_INT, SIZE, LSB }, (1 << (SIZE)) - 1, BIAS, 0, TRUE \ + { OP_INT, SIZE, LSB }, (1 << (SIZE)) - 1, BIAS, 0, true \ }; \ return &op.root; \ } @@ -114,20 +117,20 @@ { \ static const struct mips_pcrel_operand op = { \ { { OP_PCREL, SIZE, LSB }, \ - (1 << ((SIZE) - (IS_SIGNED))) - 1, 0, SHIFT, TRUE }, \ + (1 << ((SIZE) - (IS_SIGNED))) - 1, 0, SHIFT, true }, \ ALIGN_LOG2, INCLUDE_ISA_BIT, FLIP_ISA_BIT \ }; \ return &op.root.root; \ } #define JUMP(SIZE, LSB, SHIFT) \ - PCREL (SIZE, LSB, FALSE, SHIFT, SIZE + SHIFT, TRUE, FALSE) + PCREL (SIZE, LSB, false, SHIFT, SIZE + SHIFT, true, false) #define JALX(SIZE, LSB, SHIFT) \ - PCREL (SIZE, LSB, FALSE, SHIFT, SIZE + SHIFT, TRUE, TRUE) + PCREL (SIZE, LSB, false, SHIFT, SIZE + SHIFT, true, true) #define BRANCH(SIZE, LSB, SHIFT) \ - PCREL (SIZE, LSB, TRUE, SHIFT, 0, TRUE, FALSE) + PCREL (SIZE, LSB, true, SHIFT, 0, true, false) #define SPECIAL(SIZE, LSB, TYPE) \ { \