Use sizeof(tcg_target_long) instead of division.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
};
/* Stack frame parameters. */
-#define REG_SIZE (TCG_TARGET_REG_BITS / 8)
+#define REG_SIZE ((int)sizeof(tcg_target_long))
#define SAVE_SIZE ((int)ARRAY_SIZE(tcg_target_callee_save_regs) * REG_SIZE)
#define TEMP_SIZE (CPU_TEMP_BUF_NLONGS * (int)sizeof(long))
#define FRAME_SIZE ((TCG_STATIC_CALL_ARGS_SIZE + TEMP_SIZE + SAVE_SIZE \
.h.cie.id = -1,
.h.cie.version = 1,
.h.cie.code_align = 1,
- .h.cie.data_align = -(TCG_TARGET_REG_BITS / 8) & 0x7f, /* sleb128 */
+ .h.cie.data_align = -sizeof(tcg_target_long) & 0x7f, /* sleb128 */
.h.cie.return_column = TCG_REG_RA,
/* Total FDE size does not include the "len" member. */
#define SZP ((int)sizeof(void *))
/* Shorthand for size of a register. */
-#define SZR (TCG_TARGET_REG_BITS / 8)
+#define SZR ((int)sizeof(tcg_target_long))
#define TCG_CT_CONST_S16 0x00100
#define TCG_CT_CONST_U16 0x00200
};
/* Stack frame parameters. */
-#define REG_SIZE (TCG_TARGET_REG_BITS / 8)
+#define REG_SIZE ((int)sizeof(tcg_target_long))
#define SAVE_SIZE ((int)ARRAY_SIZE(tcg_target_callee_save_regs) * REG_SIZE)
#define TEMP_SIZE (CPU_TEMP_BUF_NLONGS * (int)sizeof(long))
#define FRAME_SIZE ((TCG_STATIC_CALL_ARGS_SIZE + TEMP_SIZE + SAVE_SIZE \
.h.cie.id = -1,
.h.cie.version = 1,
.h.cie.code_align = 1,
- .h.cie.data_align = -(TCG_TARGET_REG_BITS / 8) & 0x7f, /* sleb128 */
+ .h.cie.data_align = -sizeof(tcg_target_long) & 0x7f, /* sleb128 */
.h.cie.return_column = TCG_REG_RA,
/* Total FDE size does not include the "len" member. */
}
/* Otherwise, inline with an integer type, unless "large". */
- if (check_size_impl(oprsz, TCG_TARGET_REG_BITS / 8)) {
+ if (check_size_impl(oprsz, sizeof(tcg_target_long))) {
t_64 = NULL;
t_32 = NULL;