 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Roedy Green Guest
|
Posted: Sat May 29, 2004 9:40 am Post subject: ASM and JNI |
|
|
When you write your JNI in assembler for Windows, and you want to
return a long, which register pair does it go in, and which is the
high order?
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
|
|
| Back to top |
|
 |
Roedy Green Guest
|
Posted: Sat May 29, 2004 10:00 am Post subject: Re: ASM and JNI |
|
|
On Sat, 29 May 2004 09:40:00 GMT, Roedy Green
<look-on (AT) mindprod (DOT) com.invalid> wrote or quoted :
| Quote: | When you write your JNI in assembler for Windows, and you want to
return a long, which register pair does it go in, and which is the
high order?
|
edx:eax where edx is the high order. I finally found the /FA switch
in the projects settings that generates *.ASM files which lets you
figure out the register conventions by looking an ASM code generated
from C and C++.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
|
|
| Back to top |
|
 |
glen herrmannsfeldt Guest
|
Posted: Wed Jun 02, 2004 10:57 pm Post subject: Re: ASM and JNI |
|
|
Roedy Green wrote:
| Quote: | When you write your JNI in assembler for Windows, and you want to
return a long, which register pair does it go in, and which is the
high order?
|
All x86 code that I know of use EDX:EAX with EDX high.
At least one that I know of, the RDTSC instruction,
returns it that way. My favorite JNI has the executable
assembly code:
rdtsc
ret
with a few more instruction to tell the assembler what
to do with it, but that aren't executable.
-- glen
|
|
| Back to top |
|
 |
striker Guest
|
Posted: Fri Jun 04, 2004 3:44 am Post subject: Re: ASM and JNI |
|
|
Under win32 you dont need to register pair. EAX is sufficient.
|
|
| Back to top |
|
 |
Roedy Green Guest
|
Posted: Fri Jun 04, 2004 4:59 am Post subject: Re: ASM and JNI |
|
|
On Thu, 03 Jun 2004 23:44:04 -0400, "striker"
<james.ladd (AT) nospam (DOT) clubmarine.com.au> wrote or quoted :
| Quote: | Under win32 you dont need to register pair. EAX is sufficient.
|
for returning a jlong 64 bits you need two registers. edx:eax.
See the source code at http://mindprod.com/products.html#PENTIUM
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|