Skip to main content

Is RomImages.cpp consistent?

4 replies [Last post]
javamobi
Offline
Joined: 2007-09-25

Hi all,

Did anybody try to make a non-x86's RomImages.cpp and compare with x86's RomImages.cpp? Are they the same?
Could I generate all platform's RomImages.cpp on x86 platform, such as arm, midp and ti-omap?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
danila
Offline
Joined: 2006-09-25

ROMImage.cpp is platform-independent.
In a typical build scenario, ROMImage.cpp for arm target is generated on x86 host.

javamobi
Offline
Joined: 2007-09-25

Hello Danila,

I appreciated your reply. Thanks.
I would like to make sure is it ok to use RomImages.cpp which made by x86 romgen.exe(I mean I used the win32 build) on any target (arm, mips, etc,.)?
Becasue of I found a different block in RomImages.cpp. please see below.
....
#ifndef PRODUCT
/* Info for checking AOT compiler consistency */
...
const int _rom_check_JavaFrame__stack_bottom_pointer_offset = -20; (4: arm)
...
const int _rom_check_JavaFrame__return_address_offset = 4; (-20: arm)
...
const int _rom_check_EntryFrame__stored_obj_value_offset = -20; (4: arm)
...
const int _rom_check_EntryFrame__fake_return_address_offset = 4; (-20: arm)
...
const int _rom_check_StackValue__stack_tag_offset = -4; (4: arm)
...
#endif

Of course, some addresses in ROM_BL(xxx,xxx) are not the same.

danila
Offline
Joined: 2006-09-25

Yes, the exception is AOT-compilation: ROM image contains compiled code for selected
methods. It is clearly platform-dependent stuff.
These checks _rom_check_* are generated to make sure that AOT-compiler uses the same information about the platform as is used in the target VM build.
When AOT-compiler is enabled, ROM image is no longer platform-independent and you need to use the ROM image generated for your particular platform.

javamobi
Offline
Joined: 2007-09-25

Hello Danila,

It's really helpful for me. Thanks.