diff options
Diffstat (limited to 'sim/common/cgen-engine.h')
-rw-r--r-- | sim/common/cgen-engine.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/common/cgen-engine.h b/sim/common/cgen-engine.h index 69f2ef6..ae4dad7 100644 --- a/sim/common/cgen-engine.h +++ b/sim/common/cgen-engine.h @@ -51,14 +51,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* Instruction field support macros. */ -#define EXTRACT_MSB0_INT(val, total, start, length) \ +#define EXTRACT_MSB0_SINT(val, total, start, length) \ (((INT) (val) << ((sizeof (INT) * 8) - (total) + (start))) \ >> ((sizeof (INT) * 8) - (length))) #define EXTRACT_MSB0_UINT(val, total, start, length) \ (((UINT) (val) << ((sizeof (UINT) * 8) - (total) + (start))) \ >> ((sizeof (UINT) * 8) - (length))) -#define EXTRACT_LSB0_INT(val, total, start, length) \ +#define EXTRACT_LSB0_SINT(val, total, start, length) \ (((INT) (val) << ((sizeof (INT) * 8) - (start) - 1)) \ >> ((sizeof (INT) * 8) - (length))) #define EXTRACT_LSB0_UINT(val, total, start, length) \ |