This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [JAVA] don't use UINT32 and UINT64 in interpret.cc


Paolo Bonzini <paolo.bonzini@polimi.it> writes:

> These are meant to be private in libffi.  Only ffi_* or FFI_* identifiers
> are public.
>
> Paolo
>
> 2003-10-14  Paolo Bonzini  <bonzini@gnu.org>
>
> 	* libjava/interpret.cc (_Jv_InterpMethod::run): don't
> 	use libffi types, they were meant to be internal.
>
> Index: gcc/libjava/interpret.cc
> ===================================================================
> RCS file: /cvs/gcc/gcc/libjava/interpret.cc,v
> retrieving revision 1.39
> diff -u -r1.39 interpret.cc
> --- gcc/libjava/interpret.cc	24 Jan 2003 19:58:21 -0000	1.39
> +++ gcc/libjava/interpret.cc	14 Oct 2003 13:16:46 -0000
> @@ -1898,7 +1898,7 @@
>      insn_iushr:
>        {
>  	jint shift = (POPI() & 0x1f);
> -	UINT32 value = (UINT32) POPI();
> +	unsigned int value = (unsigned int) POPI();
>  	PUSHI ((jint) (value >> shift));

I think you need to add appropriate masking because unsigned int is not
required to be exactly 32 bits, and as I understand POPI() returns a
signed value.

> @@ -1906,8 +1906,8 @@
>      insn_lushr:
>        {
>  	jint shift = (POPI() & 0x3f);
> -	UINT64 value = (UINT64) POPL();
> -	PUSHL ((value >> shift));
> +	unsigned long long value = (unsigned long long) POPL();
> +	PUSHL ((jlong) (value >> shift));

Same here.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]