X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=opcodes%2Fmips-formats.h;h=116d7c880e64871cc86304c979dc6e422f726173;hb=d9ebca0c360a65af583829edec98aa879e301351;hp=49a0623da535a65bda28a7a39a4c01b01b1f12be;hpb=3ccad066ac853353fb20d9bf2993107dda242801;p=platform%2Fupstream%2Fbinutils.git diff --git a/opcodes/mips-formats.h b/opcodes/mips-formats.h index 49a0623..116d7c8 100644 --- a/opcodes/mips-formats.h +++ b/opcodes/mips-formats.h @@ -1,5 +1,5 @@ /* mips-formats.h - Copyright 2013 Free Software Foundation, Inc. + Copyright (C) 2013-2014 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 @@ -69,6 +69,14 @@ return &op.root; \ } +#define OPTIONAL_REG(SIZE, LSB, BANK) \ + { \ + static const struct mips_reg_operand op = { \ + { OP_OPTIONAL_REG, SIZE, LSB }, OP_REG_##BANK, 0 \ + }; \ + return &op.root; \ + } + #define MAPPED_REG(SIZE, LSB, BANK, MAP) \ { \ typedef char ATTRIBUTE_UNUSED \ @@ -79,6 +87,16 @@ return &op.root; \ } +#define OPTIONAL_MAPPED_REG(SIZE, LSB, BANK, MAP) \ + { \ + typedef char ATTRIBUTE_UNUSED \ + static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \ + static const struct mips_reg_operand op = { \ + { OP_OPTIONAL_REG, SIZE, LSB }, OP_REG_##BANK, MAP \ + }; \ + return &op.root; \ + } + #define REG_PAIR(SIZE, LSB, BANK, MAP) \ { \ typedef char ATTRIBUTE_UNUSED \ @@ -116,3 +134,11 @@ static const struct mips_operand op = { OP_##TYPE, SIZE, LSB }; \ return &op; \ } + +#define PREV_CHECK(SIZE, LSB, GT_OK, LT_OK, EQ_OK, ZERO_OK) \ + { \ + static const struct mips_check_prev_operand op = { \ + { OP_CHECK_PREV, SIZE, LSB }, GT_OK, LT_OK, EQ_OK, ZERO_OK \ + }; \ + return &op.root; \ + }