summaryrefslogtreecommitdiff
path: root/cfrontend/Csyntax.v
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2011-04-09 16:59:13 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2011-04-09 16:59:13 +0000
commitabe2bb5c40260a31ce5ee27b841bcbd647ff8b88 (patch)
treeae109a136508da283a9e2be5f039c5f9cca4f95c /cfrontend/Csyntax.v
parentffd6080f9e1e742c73ac38354b31c6fc4e3963ba (diff)
Merge of branch "unsigned-offsets":
- In pointer values "Vptr b ofs", interpret "ofs" as an unsigned int. (Fixes issue with wrong comparison of pointers across 0x8000_0000) - Revised Stacking pass to not use negative SP offsets. - Add pointer validity checks to Cminor ... Mach to support the use of memory injections in Stacking. - Cleaned up Stacklayout modules. - IA32: improved code generation for Mgetparam. - ARM: improved code generation for op-immediate instructions. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1632 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cfrontend/Csyntax.v')
-rw-r--r--cfrontend/Csyntax.v16
1 files changed, 8 insertions, 8 deletions
diff --git a/cfrontend/Csyntax.v b/cfrontend/Csyntax.v
index 8560d5e..a199f33 100644
--- a/cfrontend/Csyntax.v
+++ b/cfrontend/Csyntax.v
@@ -893,8 +893,8 @@ Definition classify_shift (ty1: type) (ty2: type) :=
end.
Inductive classify_cmp_cases : Type:=
- | cmp_case_iiu (**r unsigned int, unsigned int *)
- | cmp_case_ipip (**r int-or-pointer, int-or-pointer *)
+ | cmp_case_ii(s: signedness) (**r int, int *)
+ | cmp_case_pp (**r pointer, pointer *)
| cmp_case_ff (**r float , float *)
| cmp_case_if(s: signedness) (**r int, float *)
| cmp_case_fi(s: signedness) (**r float, int *)
@@ -902,15 +902,15 @@ Inductive classify_cmp_cases : Type:=
Definition classify_cmp (ty1: type) (ty2: type) :=
match typeconv ty1, typeconv ty2 with
- | Tint I32 Unsigned , Tint _ _ => cmp_case_iiu
- | Tint _ _ , Tint I32 Unsigned => cmp_case_iiu
- | Tint _ _ , Tint _ _ => cmp_case_ipip
+ | Tint I32 Unsigned , Tint _ _ => cmp_case_ii Unsigned
+ | Tint _ _ , Tint I32 Unsigned => cmp_case_ii Unsigned
+ | Tint _ _ , Tint _ _ => cmp_case_ii Signed
| Tfloat _ , Tfloat _ => cmp_case_ff
| Tint _ sg, Tfloat _ => cmp_case_if sg
| Tfloat _, Tint _ sg => cmp_case_fi sg
- | Tpointer _ , Tpointer _ => cmp_case_ipip
- | Tpointer _ , Tint _ _ => cmp_case_ipip
- | Tint _ _, Tpointer _ => cmp_case_ipip
+ | Tpointer _ , Tpointer _ => cmp_case_pp
+ | Tpointer _ , Tint _ _ => cmp_case_pp
+ | Tint _ _, Tpointer _ => cmp_case_pp
| _ , _ => cmp_default
end.