From 1db431f4caefc730924440ca1a342aa44191ba8d Mon Sep 17 00:00:00 2001 From: Neale Ferguson Date: Mon, 13 Mar 2006 22:03:39 +0000 Subject: [PATCH] * s390x-codegen.h: Fix immediate checks. svn path=/trunk/mono/; revision=57914 --- mono/arch/s390x/ChangeLog | 4 ++++ mono/arch/s390x/s390x-codegen.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mono/arch/s390x/ChangeLog b/mono/arch/s390x/ChangeLog index c2e9ee9c8e6..e05279d4a94 100644 --- a/mono/arch/s390x/ChangeLog +++ b/mono/arch/s390x/ChangeLog @@ -1,3 +1,7 @@ +2006-03-13 Neale Ferguson + + * s390x-codegen.h: Fix immediate checks. + 2006-01-06 Neale Ferguson * s390x-codegen.h: Add lpdbr instruction (OP_ABS). diff --git a/mono/arch/s390x/s390x-codegen.h b/mono/arch/s390x/s390x-codegen.h index 8aefa465771..9ef7475467a 100644 --- a/mono/arch/s390x/s390x-codegen.h +++ b/mono/arch/s390x/s390x-codegen.h @@ -140,8 +140,9 @@ typedef enum { (glong)val <= (glong)((1<<15)-1)) #define s390_is_uimm16(val) ((glong)val >= 0 && (glong)val <= 65535) #define s390_is_uimm20(val) ((glong)val >= 0 && (glong)val <= 1048575) +#define s390_is_imm20(val) ((glong)val >= -524288 && (glong)val <= 524287) #define s390_is_imm12(val) ((glong)val >= (glong)-(1<<11) && \ - (glong)val <= (glong)((1<<15)-1)) + (glong)val <= (glong)((1<<11)-1)) #define s390_is_uimm12(val) ((glong)val >= 0 && (glong)val <= 4095) #define STK_BASE s390_r15 -- 2.11.4.GIT