Create binary from GCJ generated assembly
isuru herath <[email protected]>
| Newsgroups | gmane.comp.gcc.java.devel |
|---|---|
| Message-ID | <[email protected]> |
Dear All, I want to add two assembly instructions to my Java program. Earlier I was doing it in C with "asm volatile". To get the same behavior in Java I used JNI. I used GCJ with -fjni flat to crate the binary. It executed and gave the correct output. But when I checked the memory references between two assembly instructions it is very high compared to the C program. Thereafter I got the assembly version of both C and Java codes with -S option. In C version, assembly instructions are directly inserted in the proper places. But in Java version library calls are placed in the places where assembly should be inserted. I doubt this may be the case for larger memory references. So my question is is there a way to edit the gcj generated assembly and insert assembly instructions and compile it to a binar y. I tried two different ways(trial and error). Nothing worked. [1] gcj --main=new_shared_counter -o new_shared_counter new_shared_counter.s [2] gcc shared_counter.s Any help on how to compile a gcj generated assembly to binary would be greatly appreciated. regards, Isuru