Mercurial > hg > truffle
comparison src/share/vm/opto/runtime.cpp @ 14418:cfd05ec74089
8024342: PPC64 (part 111): Support for C calling conventions that require 64-bit ints.
Summary: Some platforms, as ppc and s390x/zArch require that 32-bit ints are passed as 64-bit values to C functions. This change adds support to adapt the signature and to issue proper casts to c2-compiled stubs. The functions are used in generate_native_wrapper(). Adapt signature used by the compiler as in PhaseIdealLoop::intrinsify_fill().
Reviewed-by: kvn
author | goetz |
---|---|
date | Wed, 18 Sep 2013 14:34:56 -0700 |
parents | 6cc7093e1341 |
children | 2b8e28fdf503 |
comparison
equal
deleted
inserted
replaced
14417:f3806614494a | 14418:cfd05ec74089 |
---|---|
793 return make_arraycopy_Type(ac_generic); | 793 return make_arraycopy_Type(ac_generic); |
794 } | 794 } |
795 | 795 |
796 | 796 |
797 const TypeFunc* OptoRuntime::array_fill_Type() { | 797 const TypeFunc* OptoRuntime::array_fill_Type() { |
798 const Type** fields; | |
799 int argp = TypeFunc::Parms; | |
800 if (CCallingConventionRequiresIntsAsLongs) { | |
798 // create input type (domain): pointer, int, size_t | 801 // create input type (domain): pointer, int, size_t |
799 const Type** fields = TypeTuple::fields(3 LP64_ONLY( + 1)); | 802 fields = TypeTuple::fields(3 LP64_ONLY( + 2)); |
800 int argp = TypeFunc::Parms; | 803 fields[argp++] = TypePtr::NOTNULL; |
801 fields[argp++] = TypePtr::NOTNULL; | 804 fields[argp++] = TypeLong::LONG; |
802 fields[argp++] = TypeInt::INT; | 805 fields[argp++] = Type::HALF; |
806 } else { | |
807 // create input type (domain): pointer, int, size_t | |
808 fields = TypeTuple::fields(3 LP64_ONLY( + 1)); | |
809 fields[argp++] = TypePtr::NOTNULL; | |
810 fields[argp++] = TypeInt::INT; | |
811 } | |
803 fields[argp++] = TypeX_X; // size in whatevers (size_t) | 812 fields[argp++] = TypeX_X; // size in whatevers (size_t) |
804 LP64_ONLY(fields[argp++] = Type::HALF); // other half of long length | 813 LP64_ONLY(fields[argp++] = Type::HALF); // other half of long length |
805 const TypeTuple *domain = TypeTuple::make(argp, fields); | 814 const TypeTuple *domain = TypeTuple::make(argp, fields); |
806 | 815 |
807 // create result type | 816 // create result type |