Mercurial > hg > release > icedtea6-1.7
changeset 1691:cc4f8460a676
2009-09-03 Gary Benson <gbenson@redhat.com>
* ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp: Reformatted
with trailing opening braces.
* ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.cpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp:
Likewise.
* ports/hotspot/src/cpu/zero/vm/bytecodes_zero.cpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/bytes_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/codeBuffer_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/copy_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/cppInterpreterGenerator_zero.hpp:
Likewise.
* ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/debug_zero.cpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/deoptimizerFrame_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/dump_zero.cpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/entryFrame_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/entry_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/frame_zero.cpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/frame_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/icBuffer_zero.cpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/icache_zero.cpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/icache_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/interpreterFrame_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/interpreter_zero.cpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/javaFrameAnchor_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/jniFastGetField_zero.cpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/nativeInst_zero.cpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/nativeInst_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/registerMap_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/register_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/relocInfo_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/sharedRuntime_zero.cpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/stack_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/vm_version_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/vmreg_zero.cpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/vmreg_zero.inline.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/vtableStubs_zero.cpp: Likewise.
* ports/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp:
Likewise.
* ports/hotspot/src/os_cpu/linux_zero/vm/bytes_linux_zero.inline.hpp:
Likewise.
* ports/hotspot/src/os_cpu/linux_zero/vm/orderAccess_linux_zero.inline.hpp:
Likewise.
* ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp: Likewise.
* ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp: Likewise.
* ports/hotspot/src/os_cpu/linux_zero/vm/prefetch_linux_zero.inline.hpp:
Likewise.
* ports/hotspot/src/os_cpu/linux_zero/vm/threadLS_linux_zero.cpp:
Likewise.
* ports/hotspot/src/os_cpu/linux_zero/vm/threadLS_linux_zero.hpp:
Likewise.
* ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp:
Likewise.
line wrap: on
line diff
--- a/ChangeLog Thu Sep 03 09:03:41 2009 -0400 +++ b/ChangeLog Thu Sep 03 11:23:31 2009 -0400 @@ -1,3 +1,73 @@ +2009-09-03 Gary Benson <gbenson@redhat.com> + + * ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp: Reformatted + with trailing opening braces. + * ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp: + Likewise. + * ports/hotspot/src/cpu/zero/vm/bytecodes_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/bytes_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/codeBuffer_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/copy_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/cppInterpreterGenerator_zero.hpp: + Likewise. + * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/debug_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/deoptimizerFrame_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/dump_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/entryFrame_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/entry_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/frame_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/frame_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/icBuffer_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/icache_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/icache_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/interpreterFrame_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/interpreter_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/javaFrameAnchor_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/jniFastGetField_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/nativeInst_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/nativeInst_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/registerMap_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/register_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/relocInfo_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/sharedRuntime_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/stack_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/vm_version_zero.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/vmreg_zero.cpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/vmreg_zero.inline.hpp: Likewise. + * ports/hotspot/src/cpu/zero/vm/vtableStubs_zero.cpp: Likewise. + * ports/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp: + Likewise. + * ports/hotspot/src/os_cpu/linux_zero/vm/bytes_linux_zero.inline.hpp: + Likewise. + * ports/hotspot/src/os_cpu/linux_zero/vm/orderAccess_linux_zero.inline.hpp: + Likewise. + * ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp: Likewise. + * ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp: Likewise. + * ports/hotspot/src/os_cpu/linux_zero/vm/prefetch_linux_zero.inline.hpp: + Likewise. + * ports/hotspot/src/os_cpu/linux_zero/vm/threadLS_linux_zero.cpp: + Likewise. + * ports/hotspot/src/os_cpu/linux_zero/vm/threadLS_linux_zero.hpp: + Likewise. + * ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp: + Likewise. + 2009-09-03 Gary Benson <gbenson@redhat.com> * ports/hotspot/src/cpu/zero/vm/bytecodes_zero.hpp
--- a/ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp Thu Sep 03 11:23:31 2009 -0400 @@ -26,67 +26,55 @@ #include "incls/_precompiled.incl" #include "incls/_assembler_zero.cpp.incl" -int AbstractAssembler::code_fill_byte() -{ +int AbstractAssembler::code_fill_byte() { return 0; } -void Assembler::pd_patch_instruction(address branch, address target) -{ +void Assembler::pd_patch_instruction(address branch, address target) { Unimplemented(); } #ifndef PRODUCT -void Assembler::pd_print_patched_instruction(address branch) -{ +void Assembler::pd_print_patched_instruction(address branch) { Unimplemented(); } #endif // PRODUCT -void MacroAssembler::align(int modulus) -{ +void MacroAssembler::align(int modulus) { while (offset() % modulus != 0) emit_byte(AbstractAssembler::code_fill_byte()); } -void MacroAssembler::bang_stack_with_offset(int offset) -{ +void MacroAssembler::bang_stack_with_offset(int offset) { Unimplemented(); } -void MacroAssembler::advance(int bytes) -{ +void MacroAssembler::advance(int bytes) { _code_pos += bytes; sync(); } -void MacroAssembler::store_oop(jobject obj) -{ +void MacroAssembler::store_oop(jobject obj) { code_section()->relocate(pc(), oop_Relocation::spec_for_immediate()); emit_address((address) obj); } -static void _UnimplementedStub() -{ +static void _UnimplementedStub() { report_unimplemented(__FILE__, __LINE__); } -address UnimplementedStub() -{ +address UnimplementedStub() { return (address) _UnimplementedStub; } -address UnimplementedEntry() -{ +address UnimplementedEntry() { return (address) _UnimplementedStub; } -static void _ShouldNotReachHereStub() -{ +static void _ShouldNotReachHereStub() { report_should_not_reach_here(__FILE__, __LINE__); } -address ShouldNotReachHereStub() -{ +address ShouldNotReachHereStub() { return (address) _ShouldNotReachHereStub; }
--- a/ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -52,8 +52,7 @@ }; #ifdef ASSERT -inline bool AbstractAssembler::pd_check_instruction_mark() -{ +inline bool AbstractAssembler::pd_check_instruction_mark() { Unimplemented(); } #endif
--- a/ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.cpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.cpp Thu Sep 03 11:23:31 2009 -0400 @@ -28,8 +28,7 @@ #ifdef CC_INTERP -const char *BytecodeInterpreter::name_of_field_at_address(address addr) -{ +const char *BytecodeInterpreter::name_of_field_at_address(address addr) { #define DO(member) {if (addr == (address) &(member)) return XSTR(member);} DO(_thread); DO(_bcp);
--- a/ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -35,72 +35,55 @@ interpreterState _self_link; public: - inline void set_locals(intptr_t* new_locals) - { + inline void set_locals(intptr_t* new_locals) { _locals = new_locals; } - inline void set_method(methodOop new_method) - { + inline void set_method(methodOop new_method) { _method = new_method; } - inline interpreterState self_link() - { + inline interpreterState self_link() { return _self_link; } - inline void set_self_link(interpreterState new_self_link) - { + inline void set_self_link(interpreterState new_self_link) { _self_link = new_self_link; } - inline interpreterState prev_link() - { + inline interpreterState prev_link() { return _prev_link; } - inline void set_prev_link(interpreterState new_prev_link) - { + inline void set_prev_link(interpreterState new_prev_link) { _prev_link = new_prev_link; } - inline void set_stack_limit(intptr_t* new_stack_limit) - { + inline void set_stack_limit(intptr_t* new_stack_limit) { _stack_limit = new_stack_limit; } - inline void set_stack_base(intptr_t* new_stack_base) - { + inline void set_stack_base(intptr_t* new_stack_base) { _stack_base = new_stack_base; } - inline void set_monitor_base(BasicObjectLock *new_monitor_base) - { + inline void set_monitor_base(BasicObjectLock *new_monitor_base) { _monitor_base = new_monitor_base; } - inline void set_thread(JavaThread* new_thread) - { + inline void set_thread(JavaThread* new_thread) { _thread = new_thread; } - inline void set_constants(constantPoolCacheOop new_constants) - { + inline void set_constants(constantPoolCacheOop new_constants) { _constants = new_constants; } - inline oop oop_temp() - { + inline oop oop_temp() { return _oop_temp; } - inline oop *oop_temp_addr() - { + inline oop *oop_temp_addr() { return &_oop_temp; } - inline void set_oop_temp(oop new_oop_temp) - { + inline void set_oop_temp(oop new_oop_temp) { _oop_temp = new_oop_temp; } - inline address callee_entry_point() - { + inline address callee_entry_point() { return _result._to_call._callee_entry_point; } - inline address osr_buf() - { + inline address osr_buf() { return _result._osr._osr_buf; } - inline address osr_entry() - { + inline address osr_entry() { return _result._osr._osr_entry; }
--- a/ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -25,15 +25,33 @@ // Inline interpreter functions for zero -inline jfloat BytecodeInterpreter::VMfloatAdd(jfloat op1, jfloat op2) { return op1 + op2; } -inline jfloat BytecodeInterpreter::VMfloatSub(jfloat op1, jfloat op2) { return op1 - op2; } -inline jfloat BytecodeInterpreter::VMfloatMul(jfloat op1, jfloat op2) { return op1 * op2; } -inline jfloat BytecodeInterpreter::VMfloatDiv(jfloat op1, jfloat op2) { return op1 / op2; } -inline jfloat BytecodeInterpreter::VMfloatRem(jfloat op1, jfloat op2) { return fmod(op1, op2); } +inline jfloat BytecodeInterpreter::VMfloatAdd(jfloat op1, jfloat op2) { + return op1 + op2; +} + +inline jfloat BytecodeInterpreter::VMfloatSub(jfloat op1, jfloat op2) { + return op1 - op2; +} + +inline jfloat BytecodeInterpreter::VMfloatMul(jfloat op1, jfloat op2) { + return op1 * op2; +} -inline jfloat BytecodeInterpreter::VMfloatNeg(jfloat op) { return -op; } +inline jfloat BytecodeInterpreter::VMfloatDiv(jfloat op1, jfloat op2) { + return op1 / op2; +} + +inline jfloat BytecodeInterpreter::VMfloatRem(jfloat op1, jfloat op2) { + return fmod(op1, op2); +} -inline int32_t BytecodeInterpreter::VMfloatCompare(jfloat op1, jfloat op2, int32_t direction) { +inline jfloat BytecodeInterpreter::VMfloatNeg(jfloat op) { + return -op; +} + +inline int32_t BytecodeInterpreter::VMfloatCompare(jfloat op1, + jfloat op2, + int32_t direction) { return ( op1 < op2 ? -1 : op1 > op2 ? 1 : op1 == op2 ? 0 : @@ -41,7 +59,8 @@ } -inline void BytecodeInterpreter::VMmemCopy64(uint32_t to[2], const uint32_t from[2]) { +inline void BytecodeInterpreter::VMmemCopy64(uint32_t to[2], + const uint32_t from[2]) { *(uint64_t *) to = *(uint64_t *) from; } @@ -182,7 +201,9 @@ return op1 - op2; } -inline int32_t BytecodeInterpreter::VMdoubleCompare(jdouble op1, jdouble op2, int32_t direction) { +inline int32_t BytecodeInterpreter::VMdoubleCompare(jdouble op1, + jdouble op2, + int32_t direction) { return ( op1 < op2 ? -1 : op1 > op2 ? 1 : op1 == op2 ? 0 :
--- a/ports/hotspot/src/cpu/zero/vm/bytecodes_zero.cpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/bytecodes_zero.cpp Thu Sep 03 11:23:31 2009 -0400 @@ -26,8 +26,7 @@ #include "incls/_precompiled.incl" #include "incls/_bytecodes_zero.cpp.incl" -void Bytecodes::pd_initialize() -{ +void Bytecodes::pd_initialize() { #if defined(PRODUCT) && defined(HOTSPOT_ASM) def(_iaccess_0, "_iaccess_0", "b_jj", NULL, T_INT, 1, true, _aload_0); def(_iaccess_1, "_iaccess_1", "b_jj", NULL, T_INT, 1, true, _aload_1);
--- a/ports/hotspot/src/cpu/zero/vm/bytes_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/bytes_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -27,8 +27,7 @@ public: // Returns true if the byte ordering used by Java is different // from the native byte ordering of the underlying machine. - static inline bool is_Java_byte_ordering_different() - { + static inline bool is_Java_byte_ordering_different() { #ifdef VM_LITTLE_ENDIAN return true; #else @@ -48,10 +47,10 @@ static inline u4 get_native_u4(address p) { switch (intptr_t(p) & 3) { - case 0: return *(u4*)p; + case 0: return *(u4*)p; - case 2: return ( u4( ((u2*)p)[1] ) << 16 ) - | ( u4( ((u2*)p)[0] ) ); + case 2: return ( u4( ((u2*)p)[1] ) << 16 ) + | ( u4( ((u2*)p)[0] ) ); default: return ( u4(p[3]) << 24 ) | ( u4(p[2]) << 16 ) @@ -62,29 +61,29 @@ static inline u8 get_native_u8(address p) { switch (intptr_t(p) & 7) { - case 0: return *(u8*)p; + case 0: return *(u8*)p; - case 4: return ( u8( ((u4*)p)[1] ) << 32 ) - | ( u8( ((u4*)p)[0] ) ); + case 4: return ( u8( ((u4*)p)[1] ) << 32 ) + | ( u8( ((u4*)p)[0] ) ); - case 2: return ( u8( ((u2*)p)[3] ) << 48 ) - | ( u8( ((u2*)p)[2] ) << 32 ) - | ( u8( ((u2*)p)[1] ) << 16 ) - | ( u8( ((u2*)p)[0] ) ); + case 2: return ( u8( ((u2*)p)[3] ) << 48 ) + | ( u8( ((u2*)p)[2] ) << 32 ) + | ( u8( ((u2*)p)[1] ) << 16 ) + | ( u8( ((u2*)p)[0] ) ); - default: return ( u8(p[7]) << 56 ) - | ( u8(p[6]) << 48 ) - | ( u8(p[5]) << 40 ) - | ( u8(p[4]) << 32 ) - | ( u8(p[3]) << 24 ) - | ( u8(p[2]) << 16 ) - | ( u8(p[1]) << 8 ) - | u8(p[0]); + default: return ( u8(p[7]) << 56 ) + | ( u8(p[6]) << 48 ) + | ( u8(p[5]) << 40 ) + | ( u8(p[4]) << 32 ) + | ( u8(p[3]) << 24 ) + | ( u8(p[2]) << 16 ) + | ( u8(p[1]) << 8 ) + | u8(p[0]); } } - static inline void put_native_u2(address p, u2 x) { - if ( (intptr_t(p) & 1) == 0 ) *(u2*)p = x; + static inline void put_native_u2(address p, u2 x) { + if ((intptr_t(p) & 1) == 0) *(u2*) p = x; else { p[1] = x >> 8; p[0] = x; @@ -143,10 +142,10 @@ static inline u4 get_native_u4(address p) { switch (intptr_t(p) & 3) { - case 0: return *(u4*)p; + case 0: return *(u4*)p; - case 2: return ( u4( ((u2*)p)[0] ) << 16 ) - | ( u4( ((u2*)p)[1] ) ); + case 2: return ( u4( ((u2*)p)[0] ) << 16 ) + | ( u4( ((u2*)p)[1] ) ); default: return ( u4(p[0]) << 24 ) | ( u4(p[1]) << 16 ) @@ -157,28 +156,28 @@ static inline u8 get_native_u8(address p) { switch (intptr_t(p) & 7) { - case 0: return *(u8*)p; + case 0: return *(u8*)p; - case 4: return ( u8( ((u4*)p)[0] ) << 32 ) - | ( u8( ((u4*)p)[1] ) ); + case 4: return ( u8( ((u4*)p)[0] ) << 32 ) + | ( u8( ((u4*)p)[1] ) ); - case 2: return ( u8( ((u2*)p)[0] ) << 48 ) - | ( u8( ((u2*)p)[1] ) << 32 ) - | ( u8( ((u2*)p)[2] ) << 16 ) - | ( u8( ((u2*)p)[3] ) ); + case 2: return ( u8( ((u2*)p)[0] ) << 48 ) + | ( u8( ((u2*)p)[1] ) << 32 ) + | ( u8( ((u2*)p)[2] ) << 16 ) + | ( u8( ((u2*)p)[3] ) ); - default: return ( u8(p[0]) << 56 ) - | ( u8(p[1]) << 48 ) - | ( u8(p[2]) << 40 ) - | ( u8(p[3]) << 32 ) - | ( u8(p[4]) << 24 ) - | ( u8(p[5]) << 16 ) - | ( u8(p[6]) << 8 ) - | u8(p[7]); + default: return ( u8(p[0]) << 56 ) + | ( u8(p[1]) << 48 ) + | ( u8(p[2]) << 40 ) + | ( u8(p[3]) << 32 ) + | ( u8(p[4]) << 24 ) + | ( u8(p[5]) << 16 ) + | ( u8(p[6]) << 8 ) + | u8(p[7]); } } - static inline void put_native_u2(address p, u2 x) { + static inline void put_native_u2(address p, u2 x) { if ( (intptr_t(p) & 1) == 0 ) *(u2*)p = x; else { p[0] = x >> 8; @@ -235,29 +234,23 @@ // byte ordering (i.e. big-endian ordering). #ifdef VM_LITTLE_ENDIAN // Byte-order reversal is needed - static inline u2 get_Java_u2(address p) - { + static inline u2 get_Java_u2(address p) { return swap_u2(get_native_u2(p)); } - static inline u4 get_Java_u4(address p) - { + static inline u4 get_Java_u4(address p) { return swap_u4(get_native_u4(p)); } - static inline u8 get_Java_u8(address p) - { + static inline u8 get_Java_u8(address p) { return swap_u8(get_native_u8(p)); } - static inline void put_Java_u2(address p, u2 x) - { + static inline void put_Java_u2(address p, u2 x) { put_native_u2(p, swap_u2(x)); } - static inline void put_Java_u4(address p, u4 x) - { + static inline void put_Java_u4(address p, u4 x) { put_native_u4(p, swap_u4(x)); } - static inline void put_Java_u8(address p, u8 x) - { + static inline void put_Java_u8(address p, u8 x) { put_native_u8(p, swap_u8(x)); } @@ -267,29 +260,23 @@ static inline u8 swap_u8(u8 x); #else // No byte-order reversal is needed - static inline u2 get_Java_u2(address p) - { + static inline u2 get_Java_u2(address p) { return get_native_u2(p); } - static inline u4 get_Java_u4(address p) - { + static inline u4 get_Java_u4(address p) { return get_native_u4(p); } - static inline u8 get_Java_u8(address p) - { + static inline u8 get_Java_u8(address p) { return get_native_u8(p); } - static inline void put_Java_u2(address p, u2 x) - { + static inline void put_Java_u2(address p, u2 x) { put_native_u2(p, x); } - static inline void put_Java_u4(address p, u4 x) - { + static inline void put_Java_u4(address p, u4 x) { put_native_u4(p, x); } - static inline void put_Java_u8(address p, u8 x) - { + static inline void put_Java_u8(address p, u8 x) { put_native_u8(p, x); }
--- a/ports/hotspot/src/cpu/zero/vm/codeBuffer_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/codeBuffer_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -23,5 +23,5 @@ * */ -private: + private: void pd_initialize() {}
--- a/ports/hotspot/src/cpu/zero/vm/copy_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/copy_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -26,7 +26,7 @@ // Inline functions for memory copy and fill. static void pd_conjoint_words(HeapWord* from, HeapWord* to, size_t count) { - (void)memmove(to, from, count * HeapWordSize); + memmove(to, from, count * HeapWordSize); } static void pd_disjoint_words(HeapWord* from, HeapWord* to, size_t count) { @@ -41,7 +41,7 @@ case 1: to[0] = from[0]; case 0: break; default: - (void)memcpy(to, from, count * HeapWordSize); + memcpy(to, from, count * HeapWordSize); break; } } @@ -70,7 +70,7 @@ static void pd_aligned_conjoint_words(HeapWord* from, HeapWord* to, size_t count) { - (void)memmove(to, from, count * HeapWordSize); + memmove(to, from, count * HeapWordSize); } static void pd_aligned_disjoint_words(HeapWord* from, @@ -80,11 +80,11 @@ } static void pd_conjoint_bytes(void* from, void* to, size_t count) { - (void)memmove(to, from, count); + memmove(to, from, count); } static void pd_conjoint_bytes_atomic(void* from, void* to, size_t count) { - (void)memmove(to, from, count); + memmove(to, from, count); } static void pd_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) { @@ -109,23 +109,33 @@ #endif // _LP64 } -static void pd_arrayof_conjoint_bytes(HeapWord* from, HeapWord* to, size_t count) { +static void pd_arrayof_conjoint_bytes(HeapWord* from, + HeapWord* to, + size_t count) { _Copy_arrayof_conjoint_bytes(from, to, count); } -static void pd_arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, size_t count) { +static void pd_arrayof_conjoint_jshorts(HeapWord* from, + HeapWord* to, + size_t count) { _Copy_arrayof_conjoint_jshorts(from, to, count); } -static void pd_arrayof_conjoint_jints(HeapWord* from, HeapWord* to, size_t count) { +static void pd_arrayof_conjoint_jints(HeapWord* from, + HeapWord* to, + size_t count) { _Copy_arrayof_conjoint_jints(from, to, count); } -static void pd_arrayof_conjoint_jlongs(HeapWord* from, HeapWord* to, size_t count) { +static void pd_arrayof_conjoint_jlongs(HeapWord* from, + HeapWord* to, + size_t count) { _Copy_arrayof_conjoint_jlongs(from, to, count); } -static void pd_arrayof_conjoint_oops(HeapWord* from, HeapWord* to, size_t count) { +static void pd_arrayof_conjoint_oops(HeapWord* from, + HeapWord* to, + size_t count) { #ifdef _LP64 assert(BytesPerLong == BytesPerOop, "jlongs and oops must be the same size"); _Copy_arrayof_conjoint_jlongs(from, to, count); @@ -149,12 +159,14 @@ } } -static void pd_fill_to_aligned_words(HeapWord* tohw, size_t count, juint value) { +static void pd_fill_to_aligned_words(HeapWord* tohw, + size_t count, + juint value) { pd_fill_to_words(tohw, count, value); } static void pd_fill_to_bytes(void* to, size_t count, jubyte value) { - (void)memset(to, value, count); + memset(to, value, count); } static void pd_zero_to_words(HeapWord* tohw, size_t count) { @@ -162,5 +174,5 @@ } static void pd_zero_to_bytes(void* to, size_t count) { - (void)memset(to, 0, count); + memset(to, 0, count); }
--- a/ports/hotspot/src/cpu/zero/vm/cppInterpreterGenerator_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/cppInterpreterGenerator_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -24,14 +24,12 @@ */ protected: - MacroAssembler* assembler() const - { + MacroAssembler* assembler() const { return _masm; } protected: - address generate_entry(ZeroEntry::method_entry_t entry_point) - { + address generate_entry(ZeroEntry::method_entry_t entry_point) { ZeroEntry *entry = (ZeroEntry *) assembler()->pc(); assembler()->advance(sizeof(ZeroEntry)); entry->set_entry_point(entry_point);
--- a/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Thu Sep 03 11:23:31 2009 -0400 @@ -37,8 +37,7 @@ thread->reset_last_Java_frame(); \ fixup_after_potential_safepoint() -void CppInterpreter::normal_entry(methodOop method, intptr_t UNUSED, TRAPS) -{ +void CppInterpreter::normal_entry(methodOop method, intptr_t UNUSED, TRAPS) { JavaThread *thread = (JavaThread *) THREAD; ZeroStack *stack = thread->zero_stack(); @@ -61,8 +60,7 @@ main_loop(0, THREAD); } -void CppInterpreter::main_loop(int recurse, TRAPS) -{ +void CppInterpreter::main_loop(int recurse, TRAPS) { JavaThread *thread = (JavaThread *) THREAD; ZeroStack *stack = thread->zero_stack(); @@ -187,8 +185,7 @@ stack->push(result[-i]); } -void CppInterpreter::native_entry(methodOop method, intptr_t UNUSED, TRAPS) -{ +void CppInterpreter::native_entry(methodOop method, intptr_t UNUSED, TRAPS) { // Make sure method is native and not abstract assert(method->is_native() && !method->is_abstract(), "should be"); @@ -229,8 +226,7 @@ } // Get the signature handler - InterpreterRuntime::SignatureHandler *handler; - { + InterpreterRuntime::SignatureHandler *handler; { address handlerAddr = method->signature_handler(); if (handlerAddr == NULL) { CALL_VM_NOCHECK(InterpreterRuntime::prepare_native_call(thread, method)); @@ -260,8 +256,7 @@ Unimplemented(); } void **arguments; - void *mirror; - { + void *mirror; { arguments = (void **) stack->alloc(handler->argument_count() * sizeof(void **)); void **dst = arguments; @@ -367,8 +362,7 @@ if (header != NULL) { if (Atomic::cmpxchg_ptr(header, rcvr->mark_addr(), lock) != lock) { - monitor->set_obj(rcvr); - { + monitor->set_obj(rcvr); { HandleMark hm(thread); CALL_VM_NOCHECK(InterpreterRuntime::monitorexit(thread, monitor)); } @@ -450,8 +444,7 @@ } } -void CppInterpreter::accessor_entry(methodOop method, intptr_t UNUSED, TRAPS) -{ +void CppInterpreter::accessor_entry(methodOop method, intptr_t UNUSED, TRAPS) { JavaThread *thread = (JavaThread *) THREAD; ZeroStack *stack = thread->zero_stack(); intptr_t *locals = stack->sp(); @@ -581,8 +574,7 @@ } } -void CppInterpreter::empty_entry(methodOop method, intptr_t UNUSED, TRAPS) -{ +void CppInterpreter::empty_entry(methodOop method, intptr_t UNUSED, TRAPS) { JavaThread *thread = (JavaThread *) THREAD; ZeroStack *stack = thread->zero_stack(); @@ -596,8 +588,7 @@ stack->set_sp(stack->sp() + method->size_of_parameters()); } -bool CppInterpreter::stack_overflow_imminent(JavaThread *thread) -{ +bool CppInterpreter::stack_overflow_imminent(JavaThread *thread) { // How is the ABI stack? address stack_top = thread->stack_base() - thread->stack_size(); int free_stack = os::current_stack_pointer() - stack_top; @@ -622,8 +613,7 @@ InterpreterFrame *InterpreterFrame::build(ZeroStack* stack, const methodOop method, - JavaThread* thread) -{ + JavaThread* thread) { int monitor_words = method->is_synchronized() ? frame::interpreter_frame_monitor_size() : 0; int stack_words = method->is_native() ? 0 : method->max_stack(); @@ -682,8 +672,7 @@ return (InterpreterFrame *) fp; } -int AbstractInterpreter::BasicType_as_index(BasicType type) -{ +int AbstractInterpreter::BasicType_as_index(BasicType type) { int i = 0; switch (type) { case T_BOOLEAN: i = 0; break; @@ -704,31 +693,27 @@ return i; } -address InterpreterGenerator::generate_empty_entry() -{ +address InterpreterGenerator::generate_empty_entry() { if (!UseFastEmptyMethods) return NULL; return generate_entry(CppInterpreter::empty_entry); } -address InterpreterGenerator::generate_accessor_entry() -{ +address InterpreterGenerator::generate_accessor_entry() { if (!UseFastAccessorMethods) return NULL; return generate_entry(CppInterpreter::accessor_entry); } -address InterpreterGenerator::generate_native_entry(bool synchronized) -{ +address InterpreterGenerator::generate_native_entry(bool synchronized) { assert (synchronized == false, "should be"); return generate_entry(CppInterpreter::native_entry); } -address InterpreterGenerator::generate_normal_entry(bool synchronized) -{ +address InterpreterGenerator::generate_normal_entry(bool synchronized) { assert (synchronized == false, "should be"); return generate_entry(CppInterpreter::normal_entry); @@ -736,7 +721,8 @@ #if defined(PRODUCT) && defined(HOTSPOT_ASM) typedef void (*BCI_ENTRY)(methodOopDesc*, intptr_t, Thread*); -extern "C" BCI_ENTRY asm_generate_method_entry(AbstractInterpreter::MethodKind kind); +extern "C" BCI_ENTRY asm_generate_method_entry( + AbstractInterpreter::MethodKind kind); #endif // HOTSPOT_ASM address AbstractInterpreterGenerator::generate_method_entry( @@ -745,11 +731,12 @@ address entry_point = NULL; #if defined(PRODUCT) && defined(HOTSPOT_ASM) - if (!UseCompiler && !TaggedStackInterpreter && !JvmtiExport::can_post_interpreter_events() - && !PrintCommandLineFlags) { - BCI_ENTRY asm_entry = asm_generate_method_entry(kind); - if (asm_entry) - return ((InterpreterGenerator*)this)->generate_entry(asm_entry); + if (!UseCompiler && !TaggedStackInterpreter && + !JvmtiExport::can_post_interpreter_events() && + !PrintCommandLineFlags) { + BCI_ENTRY asm_entry = asm_generate_method_entry(kind); + if (asm_entry) + return ((InterpreterGenerator*)this)->generate_entry(asm_entry); } #endif // HOTSPOT_ASM @@ -805,8 +792,7 @@ // Deoptimization helpers -InterpreterFrame *InterpreterFrame::build(ZeroStack* stack, int size) -{ +InterpreterFrame *InterpreterFrame::build(ZeroStack* stack, int size) { int size_in_words = size >> LogBytesPerWord; assert(size_in_words * wordSize == size, "unaligned"); assert(size_in_words >= header_words, "too small"); @@ -840,8 +826,7 @@ int callee_locals, frame* caller, frame* interpreter_frame, - bool is_top_frame) -{ + bool is_top_frame) { assert(popframe_extra_args == 0, "what to do?"); assert(!is_top_frame || (!callee_locals && !callee_param_count), "top frame should have no caller") @@ -894,8 +879,7 @@ intptr_t* stack_base, intptr_t* monitor_base, intptr_t* frame_bottom, - bool is_top_frame) -{ + bool is_top_frame) { istate->set_locals(locals); istate->set_method(method); istate->set_self_link(istate); @@ -922,27 +906,23 @@ istate->set_stack_limit(stack_base - method->max_stack() - 1); } -address CppInterpreter::return_entry(TosState state, int length) -{ +address CppInterpreter::return_entry(TosState state, int length) { Unimplemented(); } -address CppInterpreter::deopt_entry(TosState state, int length) -{ +address CppInterpreter::deopt_entry(TosState state, int length) { return NULL; } // Helper for (runtime) stack overflow checks -int AbstractInterpreter::size_top_interpreter_activation(methodOop method) -{ +int AbstractInterpreter::size_top_interpreter_activation(methodOop method) { return 0; } // Helper for figuring out if frames are interpreter frames -bool CppInterpreter::contains(address pc) -{ +bool CppInterpreter::contains(address pc) { #ifdef PRODUCT ShouldNotCallThis(); #else
--- a/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -23,7 +23,6 @@ * */ - protected: // Size of interpreter code const static int InterpreterCodeSize = 6 * K;
--- a/ports/hotspot/src/cpu/zero/vm/debug_zero.cpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/debug_zero.cpp Thu Sep 03 11:23:31 2009 -0400 @@ -26,7 +26,6 @@ #include "incls/_precompiled.incl" #include "incls/_debug_zero.cpp.incl" -void pd_ps(frame f) -{ +void pd_ps(frame f) { Unimplemented(); }
--- a/ports/hotspot/src/cpu/zero/vm/deoptimizerFrame_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/deoptimizerFrame_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -34,8 +34,7 @@ friend class ZeroStackPrinter; private: - DeoptimizerFrame() : ZeroFrame() - { + DeoptimizerFrame() : ZeroFrame() { ShouldNotCallThis(); }
--- a/ports/hotspot/src/cpu/zero/vm/dump_zero.cpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/dump_zero.cpp Thu Sep 03 11:23:31 2009 -0400 @@ -29,9 +29,8 @@ void CompactingPermGenGen::generate_vtable_methods(void** vtbl_list, void** vtable, char** md_top, - char* md_end, + char* md_end, char** mc_top, - char* mc_end) -{ + char* mc_end) { Unimplemented(); }
--- a/ports/hotspot/src/cpu/zero/vm/entryFrame_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/entryFrame_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -38,8 +38,7 @@ friend class ZeroStackPrinter; private: - EntryFrame() : ZeroFrame() - { + EntryFrame() : ZeroFrame() { ShouldNotCallThis(); } @@ -55,8 +54,7 @@ int parameter_words, JavaCallWrapper* call_wrapper); public: - JavaCallWrapper *call_wrapper() const - { + JavaCallWrapper *call_wrapper() const { return (JavaCallWrapper *) value_of_word(call_wrapper_off); } };
--- a/ports/hotspot/src/cpu/zero/vm/entry_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/entry_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -25,8 +25,7 @@ class ZeroEntry { public: - ZeroEntry() - { + ZeroEntry() { ShouldNotCallThis(); } @@ -41,28 +40,23 @@ method_entry_t _entry_point; public: - method_entry_t entry_point() const - { + method_entry_t entry_point() const { return _entry_point; } - void set_entry_point(method_entry_t entry_point) - { + void set_entry_point(method_entry_t entry_point) { _entry_point = entry_point; } public: - void invoke(methodOop method, TRAPS) const - { + void invoke(methodOop method, TRAPS) const { entry_point()(method, (intptr_t) this, THREAD); } - void invoke_osr(methodOop method, address osr_buf, TRAPS) const - { + void invoke_osr(methodOop method, address osr_buf, TRAPS) const { ((osr_entry_t) entry_point())(method, osr_buf, (intptr_t) this, THREAD); } public: - static ByteSize entry_point_offset() - { + static ByteSize entry_point_offset() { return byte_offset_of(ZeroEntry, _entry_point); } };
--- a/ports/hotspot/src/cpu/zero/vm/frame_zero.cpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/frame_zero.cpp Thu Sep 03 11:23:31 2009 -0400 @@ -27,24 +27,20 @@ #include "incls/_frame_zero.cpp.incl" #ifdef ASSERT -void RegisterMap::check_location_valid() -{ +void RegisterMap::check_location_valid() { Unimplemented(); } #endif -bool frame::is_interpreted_frame() const -{ +bool frame::is_interpreted_frame() const { return zeroframe()->is_interpreter_frame(); } -bool frame::is_deoptimizer_frame() const -{ +bool frame::is_deoptimizer_frame() const { return zeroframe()->is_deoptimizer_frame(); } -frame frame::sender_for_entry_frame(RegisterMap *map) const -{ +frame frame::sender_for_entry_frame(RegisterMap *map) const { assert(map != NULL, "map must be set"); assert(!entry_frame_is_first(), "next Java fp must be non zero"); assert(entry_frame_call_wrapper()->anchor()->last_Java_sp() == sender_sp(), @@ -54,23 +50,19 @@ return frame(sender_sp()); } -frame frame::sender_for_interpreter_frame(RegisterMap *map) const -{ +frame frame::sender_for_interpreter_frame(RegisterMap *map) const { return frame(sender_sp()); } -frame frame::sender_for_compiled_frame(RegisterMap *map) const -{ +frame frame::sender_for_compiled_frame(RegisterMap *map) const { return frame(sender_sp()); } -frame frame::sender_for_deoptimizer_frame(RegisterMap *map) const -{ +frame frame::sender_for_deoptimizer_frame(RegisterMap *map) const { return frame(sender_sp()); } -frame frame::sender(RegisterMap* map) const -{ +frame frame::sender(RegisterMap* map) const { // Default is not to follow arguments; the various // sender_for_xxx methods update this accordingly. map->set_include_argument_oops(false); @@ -93,42 +85,35 @@ } #ifdef CC_INTERP -BasicObjectLock* frame::interpreter_frame_monitor_begin() const -{ +BasicObjectLock* frame::interpreter_frame_monitor_begin() const { return get_interpreterState()->monitor_base(); } -BasicObjectLock* frame::interpreter_frame_monitor_end() const -{ +BasicObjectLock* frame::interpreter_frame_monitor_end() const { return (BasicObjectLock*) get_interpreterState()->stack_base(); } #endif // CC_INTERP -void frame::patch_pc(Thread* thread, address pc) -{ +void frame::patch_pc(Thread* thread, address pc) { // We borrow this call to set the thread pointer in the interpreter // state; the hook to set up deoptimized frames isn't supplied it. assert(pc == NULL, "should be"); get_interpreterState()->set_thread((JavaThread *) thread); } -bool frame::safe_for_sender(JavaThread *thread) -{ +bool frame::safe_for_sender(JavaThread *thread) { Unimplemented(); } -void frame::pd_gc_epilog() -{ +void frame::pd_gc_epilog() { } -bool frame::is_interpreted_frame_valid(JavaThread *thread) const -{ +bool frame::is_interpreted_frame_valid(JavaThread *thread) const { Unimplemented(); } BasicType frame::interpreter_frame_result(oop* oop_result, - jvalue* value_result) -{ + jvalue* value_result) { assert(is_interpreted_frame(), "interpreted frame expected"); methodOop method = interpreter_frame_method(); BasicType type = method->result_type(); @@ -183,8 +168,7 @@ return type; } -int frame::frame_size() const -{ +int frame::frame_size() const { #ifdef PRODUCT ShouldNotCallThis(); #else @@ -192,8 +176,7 @@ #endif // PRODUCT } -intptr_t* frame::interpreter_frame_tos_at(jint offset) const -{ +intptr_t* frame::interpreter_frame_tos_at(jint offset) const { int index = (Interpreter::expr_offset_in_bytes(offset) / wordSize); return &interpreter_frame_tos_address()[index]; }
--- a/ports/hotspot/src/cpu/zero/vm/frame_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/frame_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -23,11 +23,11 @@ * */ - // A frame represents a physical stack frame (an activation). Frames - // can be C or Java frames, and the Java frames can be interpreted or - // compiled. In contrast, vframes represent source-level activations, - // so that one physical frame can correspond to multiple source level - // frames because of inlining. A frame is comprised of {pc, sp} +// A frame represents a physical stack frame (an activation). Frames +// can be C or Java frames, and the Java frames can be interpreted or +// compiled. In contrast, vframes represent source-level activations, +// so that one physical frame can correspond to multiple source level +// frames because of inlining. A frame is comprised of {pc, sp} public: enum { @@ -39,8 +39,7 @@ frame(intptr_t* sp); // accessors for the instance variables - intptr_t* fp() const - { + intptr_t* fp() const { return (intptr_t *) -1; } @@ -49,21 +48,17 @@ #endif // CC_INTERP public: - const ZeroFrame *zeroframe() const - { + const ZeroFrame *zeroframe() const { return (ZeroFrame *) sp(); } - const EntryFrame *zero_entryframe() const - { + const EntryFrame *zero_entryframe() const { return zeroframe()->as_entry_frame(); } - const InterpreterFrame *zero_interpreterframe() const - { + const InterpreterFrame *zero_interpreterframe() const { return zeroframe()->as_interpreter_frame(); } - const SharkFrame *zero_sharkframe() const - { + const SharkFrame *zero_sharkframe() const { return zeroframe()->as_shark_frame(); }
--- a/ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -30,16 +30,14 @@ // Constructors -inline frame::frame() -{ +inline frame::frame() { _sp = NULL; _pc = NULL; _cb = NULL; _deopt_state = unknown; } -inline frame::frame(intptr_t* sp) -{ +inline frame::frame(intptr_t* sp) { _sp = sp; switch (zeroframe()->type()) { case ZeroFrame::ENTRY_FRAME: @@ -70,104 +68,85 @@ // Accessors -inline intptr_t* frame::sender_sp() const -{ +inline intptr_t* frame::sender_sp() const { return (intptr_t *) zeroframe()->next(); } -inline intptr_t* frame::link() const -{ +inline intptr_t* frame::link() const { Unimplemented(); } #ifdef CC_INTERP -inline interpreterState frame::get_interpreterState() const -{ +inline interpreterState frame::get_interpreterState() const { return zero_interpreterframe()->interpreter_state(); } -inline intptr_t** frame::interpreter_frame_locals_addr() const -{ +inline intptr_t** frame::interpreter_frame_locals_addr() const { return &(get_interpreterState()->_locals); } -inline intptr_t* frame::interpreter_frame_bcx_addr() const -{ +inline intptr_t* frame::interpreter_frame_bcx_addr() const { return (intptr_t*) &(get_interpreterState()->_bcp); } -inline constantPoolCacheOop* frame::interpreter_frame_cache_addr() const -{ +inline constantPoolCacheOop* frame::interpreter_frame_cache_addr() const { return &(get_interpreterState()->_constants); } -inline methodOop* frame::interpreter_frame_method_addr() const -{ +inline methodOop* frame::interpreter_frame_method_addr() const { return &(get_interpreterState()->_method); } -inline intptr_t* frame::interpreter_frame_mdx_addr() const -{ +inline intptr_t* frame::interpreter_frame_mdx_addr() const { return (intptr_t*) &(get_interpreterState()->_mdx); } -inline intptr_t* frame::interpreter_frame_tos_address() const -{ +inline intptr_t* frame::interpreter_frame_tos_address() const { return get_interpreterState()->_stack + 1; } #endif // CC_INTERP -inline int frame::interpreter_frame_monitor_size() -{ +inline int frame::interpreter_frame_monitor_size() { return BasicObjectLock::size(); } -inline intptr_t* frame::interpreter_frame_expression_stack() const -{ +inline intptr_t* frame::interpreter_frame_expression_stack() const { intptr_t* monitor_end = (intptr_t*) interpreter_frame_monitor_end(); return monitor_end - 1; } -inline jint frame::interpreter_frame_expression_stack_direction() -{ +inline jint frame::interpreter_frame_expression_stack_direction() { return -1; } // Return a unique id for this frame. The id must have a value where // we can distinguish identity and younger/older relationship. NULL // represents an invalid (incomparable) frame. -inline intptr_t* frame::id() const -{ +inline intptr_t* frame::id() const { return sp(); } -inline JavaCallWrapper* frame::entry_frame_call_wrapper() const -{ +inline JavaCallWrapper* frame::entry_frame_call_wrapper() const { return zero_entryframe()->call_wrapper(); } -inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) -{ +inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) { Unimplemented(); } -inline oop frame::saved_oop_result(RegisterMap* map) const -{ +inline oop frame::saved_oop_result(RegisterMap* map) const { Unimplemented(); } -inline bool frame::is_older(intptr_t* id) const -{ +inline bool frame::is_older(intptr_t* id) const { Unimplemented(); } -inline intptr_t* frame::entry_frame_argument_at(int offset) const -{ +inline intptr_t* frame::entry_frame_argument_at(int offset) const { Unimplemented(); } -inline intptr_t* frame::unextended_sp() const -{ +inline intptr_t* frame::unextended_sp() const { if (zeroframe()->is_shark_frame()) return zero_sharkframe()->unextended_sp(); else
--- a/ports/hotspot/src/cpu/zero/vm/icBuffer_zero.cpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/icBuffer_zero.cpp Thu Sep 03 11:23:31 2009 -0400 @@ -26,8 +26,7 @@ #include "incls/_precompiled.incl" #include "incls/_icBuffer_zero.cpp.incl" -int InlineCacheBuffer::ic_stub_code_size() -{ +int InlineCacheBuffer::ic_stub_code_size() { // NB set this once the functions below are implemented return 4; } @@ -39,14 +38,12 @@ Unimplemented(); } -address InlineCacheBuffer::ic_buffer_entry_point(address code_begin) -{ +address InlineCacheBuffer::ic_buffer_entry_point(address code_begin) { // NB ic_stub_code_size() must return the size of the code we generate Unimplemented(); } -oop InlineCacheBuffer::ic_buffer_cached_oop(address code_begin) -{ +oop InlineCacheBuffer::ic_buffer_cached_oop(address code_begin) { // NB ic_stub_code_size() must return the size of the code we generate Unimplemented(); }
--- a/ports/hotspot/src/cpu/zero/vm/icache_zero.cpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/icache_zero.cpp Thu Sep 03 11:23:31 2009 -0400 @@ -32,5 +32,5 @@ StubCodeMark mark(this, "ICache", "flush_icache_stub"); - *flush_icache_stub = (ICache::flush_icache_stub_t)UnimplementedStub(); + *flush_icache_stub = (ICache::flush_icache_stub_t) UnimplementedStub(); }
--- a/ports/hotspot/src/cpu/zero/vm/icache_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/icache_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -28,6 +28,5 @@ // has to be flushed. class ICache : public AbstractICache { - // Use default implementation };
--- a/ports/hotspot/src/cpu/zero/vm/interpreterFrame_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/interpreterFrame_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -43,8 +43,7 @@ friend class AbstractInterpreter; private: - InterpreterFrame() : ZeroFrame() - { + InterpreterFrame() : ZeroFrame() { ShouldNotCallThis(); } @@ -63,8 +62,7 @@ static InterpreterFrame *build(ZeroStack* stack, int size); public: - interpreterState interpreter_state() const - { + interpreterState interpreter_state() const { return (interpreterState) addr_of_word(istate_off); } };
--- a/ports/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -23,7 +23,6 @@ * */ - // Generation of Interpreter // friend class AbstractInterpreterGenerator;
--- a/ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp Thu Sep 03 11:23:31 2009 -0400 @@ -26,38 +26,32 @@ #include "incls/_precompiled.incl" #include "incls/_interpreterRT_zero.cpp.incl" -void InterpreterRuntime::SignatureHandlerGeneratorBase::pass_int() -{ +void InterpreterRuntime::SignatureHandlerGeneratorBase::pass_int() { push(T_INT); _cif->nargs++; } -void InterpreterRuntime::SignatureHandlerGeneratorBase::pass_long() -{ +void InterpreterRuntime::SignatureHandlerGeneratorBase::pass_long() { push(T_LONG); _cif->nargs++; } -void InterpreterRuntime::SignatureHandlerGeneratorBase::pass_float() -{ +void InterpreterRuntime::SignatureHandlerGeneratorBase::pass_float() { push(T_FLOAT); _cif->nargs++; } -void InterpreterRuntime::SignatureHandlerGeneratorBase::pass_double() -{ +void InterpreterRuntime::SignatureHandlerGeneratorBase::pass_double() { push(T_DOUBLE); _cif->nargs++; } -void InterpreterRuntime::SignatureHandlerGeneratorBase::pass_object() -{ +void InterpreterRuntime::SignatureHandlerGeneratorBase::pass_object() { push(T_OBJECT); _cif->nargs++; } -void InterpreterRuntime::SignatureHandlerGeneratorBase::push(BasicType type) -{ +void InterpreterRuntime::SignatureHandlerGeneratorBase::push(BasicType type) { ffi_type *ftype; switch (type) { case T_VOID: @@ -125,8 +119,7 @@ push(method()->result_type()); } -void InterpreterRuntime::SignatureHandler::finalize() -{ +void InterpreterRuntime::SignatureHandler::finalize() { ffi_status status = ffi_prep_cif(cif(), FFI_DEFAULT_ABI, @@ -161,8 +154,7 @@ return (address) handler; IRT_END -void SignatureHandlerLibrary::pd_set_handler(address handlerAddr) -{ +void SignatureHandlerLibrary::pd_set_handler(address handlerAddr) { InterpreterRuntime::SignatureHandler *handler = InterpreterRuntime::SignatureHandler::from_handlerAddr(handlerAddr);
--- a/ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -23,37 +23,30 @@ * */ -class SignatureHandler -{ +class SignatureHandler { public: - static SignatureHandler *from_handlerAddr(address handlerAddr) - { + static SignatureHandler *from_handlerAddr(address handlerAddr) { return (SignatureHandler *) handlerAddr; } public: - ffi_cif* cif() const - { + ffi_cif* cif() const { return (ffi_cif *) this; } - int argument_count() const - { + int argument_count() const { return cif()->nargs; } - ffi_type** argument_types() const - { + ffi_type** argument_types() const { return (ffi_type**) (cif() + 1); } - ffi_type* argument_type(int i) const - { + ffi_type* argument_type(int i) const { return argument_types()[i]; } - ffi_type* result_type() const - { + ffi_type* result_type() const { return *(argument_types() + argument_count()); } @@ -64,20 +57,17 @@ void finalize(); }; -class SignatureHandlerGeneratorBase : public NativeSignatureIterator -{ +class SignatureHandlerGeneratorBase : public NativeSignatureIterator { private: ffi_cif* _cif; protected: SignatureHandlerGeneratorBase(methodHandle method, ffi_cif *cif) - : NativeSignatureIterator(method), _cif(cif) - { + : NativeSignatureIterator(method), _cif(cif) { _cif->nargs = 0; } - ffi_cif *cif() const - { + ffi_cif *cif() const { return _cif; } @@ -96,49 +86,42 @@ virtual void push(intptr_t value) = 0; }; -class SignatureHandlerGenerator : public SignatureHandlerGeneratorBase -{ +class SignatureHandlerGenerator : public SignatureHandlerGeneratorBase { private: CodeBuffer* _cb; public: SignatureHandlerGenerator(methodHandle method, CodeBuffer* buffer) : SignatureHandlerGeneratorBase(method, (ffi_cif *) buffer->code_end()), - _cb(buffer) - { + _cb(buffer) { _cb->set_code_end((address) (cif() + 1)); } private: - void push(intptr_t value) - { + void push(intptr_t value) { intptr_t *dst = (intptr_t *) _cb->code_end(); _cb->set_code_end((address) (dst + 1)); *dst = value; } }; -class SlowSignatureHandlerGenerator : public SignatureHandlerGeneratorBase -{ +class SlowSignatureHandlerGenerator : public SignatureHandlerGeneratorBase { private: intptr_t *_dst; public: SlowSignatureHandlerGenerator(methodHandle method, intptr_t* buf) - : SignatureHandlerGeneratorBase(method, (ffi_cif *) buf) - { + : SignatureHandlerGeneratorBase(method, (ffi_cif *) buf) { _dst = (intptr_t *) (cif() + 1); } private: - void push(intptr_t value) - { + void push(intptr_t value) { *(_dst++) = value; } public: - SignatureHandler *handler() const - { + SignatureHandler *handler() const { return (SignatureHandler *) cif(); } };
--- a/ports/hotspot/src/cpu/zero/vm/interpreter_zero.cpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/interpreter_zero.cpp Thu Sep 03 11:23:31 2009 -0400 @@ -26,23 +26,20 @@ #include "incls/_precompiled.incl" #include "incls/_interpreter_zero.cpp.incl" -address AbstractInterpreterGenerator::generate_slow_signature_handler() -{ +address AbstractInterpreterGenerator::generate_slow_signature_handler() { _masm->advance(1); return (address) InterpreterRuntime::slow_signature_handler; } address InterpreterGenerator::generate_math_entry( - AbstractInterpreter::MethodKind kind) -{ + AbstractInterpreter::MethodKind kind) { if (!InlineIntrinsics) return NULL; Unimplemented(); } -address InterpreterGenerator::generate_abstract_entry() -{ +address InterpreterGenerator::generate_abstract_entry() { return UnimplementedEntry(); } @@ -52,8 +49,7 @@ int moncount, int callee_param_count, int callee_locals, - bool is_top_frame) -{ + bool is_top_frame) { return layout_activation(method, tempcount, popframe_extra_args, @@ -66,6 +62,5 @@ } void Deoptimization::unwind_callee_save_values(frame* f, - vframeArray* vframe_array) -{ + vframeArray* vframe_array) { }
--- a/ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -24,46 +24,38 @@ */ public: - static void invoke_method(methodOop method, address entry_point, TRAPS) - { + static void invoke_method(methodOop method, address entry_point, TRAPS) { ((ZeroEntry *) entry_point)->invoke(method, THREAD); } static void invoke_osr(methodOop method, address entry_point, address osr_buf, - TRAPS) - { + TRAPS) { ((ZeroEntry *) entry_point)->invoke_osr(method, osr_buf, THREAD); } public: - static int expr_index_at(int i) - { + static int expr_index_at(int i) { return stackElementWords() * i; } - static int expr_tag_index_at(int i) - { + static int expr_tag_index_at(int i) { assert(TaggedStackInterpreter, "should not call this"); Unimplemented(); } - static int expr_offset_in_bytes(int i) - { + static int expr_offset_in_bytes(int i) { return stackElementSize() * i; } - static int expr_tag_offset_in_bytes(int i) - { + static int expr_tag_offset_in_bytes(int i) { assert(TaggedStackInterpreter, "should not call this"); Unimplemented(); } - static int local_index_at(int i) - { + static int local_index_at(int i) { assert(i <= 0, "local direction already negated"); return stackElementWords() * i + (value_offset_in_bytes() / wordSize); } - static int local_tag_index_at(int i) - { + static int local_tag_index_at(int i) { assert(TaggedStackInterpreter, "should not call this"); Unimplemented(); }
--- a/ports/hotspot/src/cpu/zero/vm/javaFrameAnchor_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/javaFrameAnchor_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -23,23 +23,21 @@ * */ -public: + public: // Each arch must define reset, save, restore // These are used by objects that only care about: // 1 - initializing a new state (thread creation, javaCalls) // 2 - saving a current state (javaCalls) // 3 - restoring an old state (javaCalls) - void clear() - { + void clear() { // clearing _last_Java_sp must be first _last_Java_sp = NULL; // fence? _last_Java_pc = NULL; } - void copy(JavaFrameAnchor* src) - { + void copy(JavaFrameAnchor* src) { // In order to make sure the transition state is valid for "this" // We must clear _last_Java_sp before copying the rest of the new // data @@ -57,22 +55,18 @@ _last_Java_sp = src->_last_Java_sp; } - bool walkable() - { + bool walkable() { return true; } - void make_walkable(JavaThread* thread) - { + void make_walkable(JavaThread* thread) { // nothing to do } - intptr_t* last_Java_sp() const - { + intptr_t* last_Java_sp() const { return _last_Java_sp; } - void set_last_Java_sp(intptr_t* sp) - { + void set_last_Java_sp(intptr_t* sp) { _last_Java_sp = sp; }
--- a/ports/hotspot/src/cpu/zero/vm/jniFastGetField_zero.cpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/jniFastGetField_zero.cpp Thu Sep 03 11:23:31 2009 -0400 @@ -26,42 +26,34 @@ #include "incls/_precompiled.incl" #include "incls/_jniFastGetField_zero.cpp.incl" -address JNI_FastGetField::generate_fast_get_boolean_field() -{ +address JNI_FastGetField::generate_fast_get_boolean_field() { return (address) -1; } -address JNI_FastGetField::generate_fast_get_byte_field() -{ +address JNI_FastGetField::generate_fast_get_byte_field() { return (address) -1; } -address JNI_FastGetField::generate_fast_get_char_field() -{ +address JNI_FastGetField::generate_fast_get_char_field() { return (address) -1; } -address JNI_FastGetField::generate_fast_get_short_field() -{ +address JNI_FastGetField::generate_fast_get_short_field() { return (address) -1; } -address JNI_FastGetField::generate_fast_get_int_field() -{ +address JNI_FastGetField::generate_fast_get_int_field() { return (address) -1; } -address JNI_FastGetField::generate_fast_get_long_field() -{ +address JNI_FastGetField::generate_fast_get_long_field() { return (address) -1; } -address JNI_FastGetField::generate_fast_get_float_field() -{ +address JNI_FastGetField::generate_fast_get_float_field() { return (address) -1; } -address JNI_FastGetField::generate_fast_get_double_field() -{ +address JNI_FastGetField::generate_fast_get_double_field() { return (address) -1; }
--- a/ports/hotspot/src/cpu/zero/vm/nativeInst_zero.cpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/nativeInst_zero.cpp Thu Sep 03 11:23:31 2009 -0400 @@ -38,8 +38,7 @@ void NativeJump::patch_verified_entry(address entry, address verified_entry, - address dest) -{ + address dest) { assert(dest == SharedRuntime::get_handle_wrong_method_stub(), "should be"); #ifdef CC_INTERP
--- a/ports/hotspot/src/cpu/zero/vm/nativeInst_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/nativeInst_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -38,151 +38,122 @@ // The base class for different kinds of native instruction abstractions. // Provides the primitive operations to manipulate code relative to this. -class NativeInstruction VALUE_OBJ_CLASS_SPEC -{ +class NativeInstruction VALUE_OBJ_CLASS_SPEC { public: - bool is_jump() - { + bool is_jump() { Unimplemented(); } - bool is_safepoint_poll() - { + bool is_safepoint_poll() { Unimplemented(); } }; -inline NativeInstruction* nativeInstruction_at(address address) -{ +inline NativeInstruction* nativeInstruction_at(address address) { Unimplemented(); } -class NativeCall : public NativeInstruction -{ +class NativeCall : public NativeInstruction { public: enum zero_specific_constants { instruction_size = 0 // not used within the interpreter }; - address instruction_address() const - { + address instruction_address() const { Unimplemented(); } - address next_instruction_address() const - { + address next_instruction_address() const { Unimplemented(); } - address return_address() const - { + address return_address() const { Unimplemented(); } - address destination() const - { + address destination() const { Unimplemented(); } - void set_destination_mt_safe(address dest) - { + void set_destination_mt_safe(address dest) { Unimplemented(); } - void verify_alignment() - { + void verify_alignment() { Unimplemented(); } - void verify() - { + void verify() { Unimplemented(); } - static bool is_call_before(address return_address) - { + static bool is_call_before(address return_address) { Unimplemented(); } }; -inline NativeCall* nativeCall_before(address return_address) -{ +inline NativeCall* nativeCall_before(address return_address) { Unimplemented(); } -inline NativeCall* nativeCall_at(address address) -{ +inline NativeCall* nativeCall_at(address address) { Unimplemented(); } -class NativeMovConstReg : public NativeInstruction -{ +class NativeMovConstReg : public NativeInstruction { public: - address next_instruction_address() const - { + address next_instruction_address() const { Unimplemented(); } - intptr_t data() const - { + intptr_t data() const { Unimplemented(); } - void set_data(intptr_t x) - { + void set_data(intptr_t x) { Unimplemented(); } }; -inline NativeMovConstReg* nativeMovConstReg_at(address address) -{ +inline NativeMovConstReg* nativeMovConstReg_at(address address) { Unimplemented(); } -class NativeMovRegMem : public NativeInstruction -{ +class NativeMovRegMem : public NativeInstruction { public: - int offset() const - { + int offset() const { Unimplemented(); } - void set_offset(intptr_t x) - { + void set_offset(intptr_t x) { Unimplemented(); } - void add_offset_in_bytes(int add_offset) - { + void add_offset_in_bytes(int add_offset) { Unimplemented(); } }; -inline NativeMovRegMem* nativeMovRegMem_at(address address) -{ +inline NativeMovRegMem* nativeMovRegMem_at(address address) { Unimplemented(); } -class NativeJump : public NativeInstruction -{ +class NativeJump : public NativeInstruction { public: enum zero_specific_constants { instruction_size = 0 // not used within the interpreter }; - address jump_destination() const - { + address jump_destination() const { Unimplemented(); } - void set_jump_destination(address dest) - { + void set_jump_destination(address dest) { Unimplemented(); } static void check_verified_entry_alignment(address entry, - address verified_entry) - { + address verified_entry) { } static void patch_verified_entry(address entry, @@ -190,31 +161,25 @@ address dest); }; -inline NativeJump* nativeJump_at(address address) -{ +inline NativeJump* nativeJump_at(address address) { Unimplemented(); } -class NativeGeneralJump : public NativeInstruction -{ +class NativeGeneralJump : public NativeInstruction { public: - address jump_destination() const - { + address jump_destination() const { Unimplemented(); } - static void insert_unconditional(address code_pos, address entry) - { + static void insert_unconditional(address code_pos, address entry) { Unimplemented(); } - static void replace_mt_safe(address instr_addr, address code_buffer) - { + static void replace_mt_safe(address instr_addr, address code_buffer) { Unimplemented(); } }; -inline NativeGeneralJump* nativeGeneralJump_at(address address) -{ +inline NativeGeneralJump* nativeGeneralJump_at(address address) { Unimplemented(); }
--- a/ports/hotspot/src/cpu/zero/vm/registerMap_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/registerMap_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -31,7 +31,7 @@ // Since there is none, we just return NULL. // See registerMap_sparc.hpp for an example of grabbing registers // from register save areas of a standard layout. - address pd_location(VMReg reg) const {return NULL;} + address pd_location(VMReg reg) const { return NULL; } // no PD state to clear or copy: void pd_clear() {}
--- a/ports/hotspot/src/cpu/zero/vm/register_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/register_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -46,19 +46,16 @@ VMReg as_VMReg(); // derived registers, offsets, and addresses - Register successor() const - { + Register successor() const { return as_Register(encoding() + 1); } // accessors - int encoding() const - { + int encoding() const { assert(is_valid(), "invalid register"); return (intptr_t)this; } - bool is_valid() const - { + bool is_valid() const { return 0 <= (intptr_t) this && (intptr_t)this < number_of_registers; } const char* name() const; @@ -84,19 +81,16 @@ VMReg as_VMReg(); // derived registers, offsets, and addresses - FloatRegister successor() const - { + FloatRegister successor() const { return as_FloatRegister(encoding() + 1); } // accessors - int encoding() const - { + int encoding() const { assert(is_valid(), "invalid register"); return (intptr_t)this; } - bool is_valid() const - { + bool is_valid() const { return 0 <= (intptr_t) this && (intptr_t)this < number_of_registers; } const char* name() const;
--- a/ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp Thu Sep 03 11:23:31 2009 -0400 @@ -26,52 +26,49 @@ #include "incls/_precompiled.incl" #include "incls/_relocInfo_zero.cpp.incl" -void Relocation::pd_set_data_value(address x, intptr_t o) -{ +void Relocation::pd_set_data_value(address x, intptr_t o) { Unimplemented(); } -address Relocation::pd_call_destination(address orig_addr) -{ +address Relocation::pd_call_destination(address orig_addr) { Unimplemented(); } -void Relocation::pd_set_call_destination(address x) -{ +void Relocation::pd_set_call_destination(address x) { Unimplemented(); } -address Relocation::pd_get_address_from_code() -{ +address Relocation::pd_get_address_from_code() { Unimplemented(); } -address* Relocation::pd_address_in_code() -{ +address* Relocation::pd_address_in_code() { // Relocations in Shark are just stored directly return (address *) addr(); } -int Relocation::pd_breakpoint_size() -{ +int Relocation::pd_breakpoint_size() { Unimplemented(); } -void Relocation::pd_swap_in_breakpoint(address x, short* instrs, - int instrlen) -{ +void Relocation::pd_swap_in_breakpoint(address x, + short* instrs, + int instrlen) { Unimplemented(); } -void Relocation::pd_swap_out_breakpoint(address x, short* instrs, int instrlen) -{ +void Relocation::pd_swap_out_breakpoint(address x, + short* instrs, + int instrlen) { Unimplemented(); } -void poll_Relocation::fix_relocation_after_move(const CodeBuffer* src, CodeBuffer *dest) { +void poll_Relocation::fix_relocation_after_move(const CodeBuffer* src, + CodeBuffer* dst) { Unimplemented(); } -void poll_return_Relocation::fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) { +void poll_return_Relocation::fix_relocation_after_move(const CodeBuffer* src, + CodeBuffer* dst) { Unimplemented(); }
--- a/ports/hotspot/src/cpu/zero/vm/relocInfo_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/relocInfo_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -25,8 +25,7 @@ // machine-dependent parts of class relocInfo private: - enum - { + enum { // these constants mean nothing without an assembler offset_unit = 1, format_width = 1
--- a/ports/hotspot/src/cpu/zero/vm/sharedRuntime_zero.cpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/sharedRuntime_zero.cpp Thu Sep 03 11:23:31 2009 -0400 @@ -38,8 +38,7 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt, VMRegPair *regs, int total_args_passed, - int is_outgoing) -{ + int is_outgoing) { return 0; } @@ -48,8 +47,7 @@ int total_args_passed, int comp_args_on_stack, const BasicType *sig_bt, - const VMRegPair *regs) -{ + const VMRegPair *regs) { address i2c_entry = UnimplementedStub(); address c2i_entry = UnimplementedStub(); address c2i_unverified_entry = UnimplementedStub(); @@ -62,35 +60,30 @@ int comp_args_on_stack, BasicType *in_sig_bt, VMRegPair *in_regs, - BasicType ret_type) -{ + BasicType ret_type) { Unimplemented(); } -int Deoptimization::last_frame_adjust(int callee_parameters, int callee_locals) -{ +int Deoptimization::last_frame_adjust(int callee_parameters, + int callee_locals) { return 0; } -uint SharedRuntime::out_preserve_stack_slots() -{ +uint SharedRuntime::out_preserve_stack_slots() { Unimplemented(); } -static RuntimeStub* generate_empty_runtime_stub(const char* name) -{ +static RuntimeStub* generate_empty_runtime_stub(const char* name) { CodeBuffer buffer(name, 0, 0); return RuntimeStub::new_runtime_stub(name, &buffer, 0, 0, NULL, false); } -static SafepointBlob* generate_empty_safepoint_blob() -{ +static SafepointBlob* generate_empty_safepoint_blob() { CodeBuffer buffer("handler_blob", 0, 0); return SafepointBlob::create(&buffer, NULL, 0); } -void SharedRuntime::generate_stubs() -{ +void SharedRuntime::generate_stubs() { _wrong_method_blob = generate_empty_runtime_stub("wrong_method_stub"); _ic_miss_blob = @@ -110,7 +103,6 @@ int SharedRuntime::c_calling_convention(const BasicType *sig_bt, VMRegPair *regs, - int total_args_passed) -{ + int total_args_passed) { Unimplemented(); }
--- a/ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -45,8 +45,7 @@ friend class SharkFunction; private: - SharkFrame() : ZeroFrame() - { + SharkFrame() : ZeroFrame() { ShouldNotCallThis(); } @@ -60,18 +59,15 @@ }; public: - address pc() const - { + address pc() const { return (address) value_of_word(pc_off); } - intptr_t* unextended_sp() const - { + intptr_t* unextended_sp() const { return (intptr_t *) value_of_word(unextended_sp_off); } - methodOop method() const - { + methodOop method() const { return (methodOop) value_of_word(method_off); } };
--- a/ports/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -25,7 +25,7 @@ // // Sets the default values for platform dependent flags used by the -// shark compiler. +// Shark compiler. // define_pd_global(bool, BackgroundCompilation, true );
--- a/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -36,8 +36,7 @@ ZeroStackPrinter(outputStream *st, char *buf, int buflen) : _st(st), _buf(buf), _buflen(buflen) {} - void print(JavaThread *thread) - { + void print(JavaThread *thread) { intptr_t *lo_addr = thread->zero_stack()->sp(); if (!lo_addr) { _st->print_cr(" stack not set up"); @@ -65,8 +64,7 @@ } private: - void print_word(ZeroFrame *frame, intptr_t *addr, bool top_frame) - { + void print_word(ZeroFrame *frame, intptr_t *addr, bool top_frame) { const char *field = NULL; const char *value = NULL;
--- a/ports/hotspot/src/cpu/zero/vm/stack_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/stack_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -33,13 +33,11 @@ ZeroStack() : _base(NULL), _top(NULL), _sp(NULL) {} - bool needs_setup() const - { + bool needs_setup() const { return _base == NULL; } - void setup(void *mem, size_t size) - { + void setup(void *mem, size_t size) { assert(needs_setup(), "already set up"); assert(!(size & WordAlignmentMask), "unaligned"); @@ -48,8 +46,7 @@ _sp = _top; } - void teardown() - { + void teardown() { assert(!needs_setup(), "not set up"); assert(_sp == _top, "stuff on stack at teardown"); @@ -58,54 +55,45 @@ _sp = NULL; } - intptr_t *sp() const - { + intptr_t *sp() const { return _sp; } - void set_sp(intptr_t *new_sp) - { + void set_sp(intptr_t *new_sp) { assert(_top >= new_sp && new_sp >= _base, "bad stack pointer"); _sp = new_sp; } - int available_words() const - { + int available_words() const { return _sp - _base; } - void push(intptr_t value) - { + void push(intptr_t value) { assert(_sp > _base, "stack overflow"); *(--_sp) = value; } - intptr_t pop() - { + intptr_t pop() { assert(_sp < _top, "stack underflow"); return *(_sp++); } - void *alloc(size_t size) - { + void *alloc(size_t size) { int count = align_size_up(size, wordSize) >> LogBytesPerWord; assert(count <= available_words(), "stack overflow"); return _sp -= count; } public: - static ByteSize base_offset() - { + static ByteSize base_offset() { return byte_offset_of(ZeroStack, _base); } - static ByteSize top_offset() - { + static ByteSize top_offset() { return byte_offset_of(ZeroStack, _top); } - static ByteSize sp_offset() - { + static ByteSize sp_offset() { return byte_offset_of(ZeroStack, _sp); } }; @@ -130,8 +118,7 @@ friend class ZeroStackPrinter; protected: - ZeroFrame() - { + ZeroFrame() { ShouldNotCallThis(); } @@ -149,70 +136,58 @@ }; protected: - intptr_t *addr_of_word(int offset) const - { + intptr_t *addr_of_word(int offset) const { return (intptr_t *) this - offset; } - intptr_t value_of_word(int offset) const - { + intptr_t value_of_word(int offset) const { return *addr_of_word(offset); } public: - ZeroFrame *next() const - { + ZeroFrame *next() const { return (ZeroFrame *) value_of_word(next_frame_off); } protected: - FrameType type() const - { + FrameType type() const { return (FrameType) value_of_word(frame_type_off); } public: - bool is_entry_frame() const - { + bool is_entry_frame() const { return type() == ENTRY_FRAME; } - bool is_interpreter_frame() const - { + bool is_interpreter_frame() const { return type() == INTERPRETER_FRAME; } - bool is_shark_frame() const - { + bool is_shark_frame() const { return type() == SHARK_FRAME; } - bool is_deoptimizer_frame() const - { + bool is_deoptimizer_frame() const { return type() == DEOPTIMIZER_FRAME; } public: - EntryFrame *as_entry_frame() const - { + EntryFrame *as_entry_frame() const { assert(is_entry_frame(), "should be"); return (EntryFrame *) this; } - InterpreterFrame *as_interpreter_frame() const - { + InterpreterFrame *as_interpreter_frame() const { assert(is_interpreter_frame(), "should be"); return (InterpreterFrame *) this; } - SharkFrame *as_shark_frame() const - { + SharkFrame *as_shark_frame() const { assert(is_shark_frame(), "should be"); return (SharkFrame *) this; } - DeoptimizerFrame *as_deoptimizer_frame() const - { + DeoptimizerFrame *as_deoptimizer_frame() const { assert(is_deoptimizer_frame(), "should be"); return (DeoptimizerFrame *) this; }
--- a/ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp Thu Sep 03 11:23:31 2009 -0400 @@ -30,8 +30,7 @@ // For a more detailed description of the stub routine structure // see the comment in stubRoutines.hpp -class StubGenerator: public StubCodeGenerator -{ +class StubGenerator: public StubCodeGenerator { private: // The call stub is used to call Java from C static void call_stub( @@ -42,8 +41,7 @@ address entry_point, intptr_t* parameters, int parameter_words, - TRAPS) - { + TRAPS) { JavaThread *thread = (JavaThread *) THREAD; ZeroStack *stack = thread->zero_stack(); @@ -102,13 +100,11 @@ // These stubs get called from some dumb test routine. // I'll write them properly when they're called from // something that's actually doing something. - static void fake_arraycopy_stub(address src, address dst, int count) - { + static void fake_arraycopy_stub(address src, address dst, int count) { assert(count == 0, "huh?"); } - void generate_arraycopy_stubs() - { + void generate_arraycopy_stubs() { // Call the conjoint generation methods immediately after // the disjoint ones so that short branches from the former // to the latter can be generated. @@ -159,8 +155,7 @@ StubRoutines::_oop_arraycopy; } - void generate_initial() - { + void generate_initial() { // Generates all stubs and initializes the entry points // entry points that exist in all platforms Note: This is code @@ -188,8 +183,7 @@ UnimplementedStub(); } - void generate_all() - { + void generate_all() { // Generates all stubs and initializes the entry points // These entry points require SharedInfo::stack0 to be set up in @@ -219,8 +213,7 @@ } public: - StubGenerator(CodeBuffer* code, bool all) : StubCodeGenerator(code) - { + StubGenerator(CodeBuffer* code, bool all) : StubCodeGenerator(code) { if (all) { generate_all(); } else { @@ -229,16 +222,14 @@ } }; -void StubGenerator_generate(CodeBuffer* code, bool all) -{ +void StubGenerator_generate(CodeBuffer* code, bool all) { StubGenerator g(code, all); } EntryFrame *EntryFrame::build(ZeroStack* stack, const intptr_t* parameters, int parameter_words, - JavaCallWrapper* call_wrapper) -{ + JavaCallWrapper* call_wrapper) { if (header_words + parameter_words > stack->available_words()) { Unimplemented(); }
--- a/ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -28,25 +28,21 @@ // extend it. public: - static address call_stub_return_pc() - { + static address call_stub_return_pc() { return (address) -1; } - static bool returns_to_call_stub(address return_pc) - { + static bool returns_to_call_stub(address return_pc) { return return_pc == call_stub_return_pc(); } - enum platform_dependent_constants - { + enum platform_dependent_constants { code_size1 = 0, // The assembler will fail with a guarantee code_size2 = 0 // if these are too small. Simply increase }; // them if that happens. #ifdef IA32 - class x86 - { + class x86 { friend class VMStructs; private:
--- a/ports/hotspot/src/cpu/zero/vm/vm_version_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/vm_version_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -25,8 +25,7 @@ class VM_Version : public Abstract_VM_Version { public: - static const char* cpu_features() - { + static const char* cpu_features() { return ""; } };
--- a/ports/hotspot/src/cpu/zero/vm/vmreg_zero.cpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/vmreg_zero.cpp Thu Sep 03 11:23:31 2009 -0400 @@ -26,8 +26,7 @@ #include "incls/_precompiled.incl" #include "incls/_vmreg_zero.cpp.incl" -void VMRegImpl::set_regName() -{ +void VMRegImpl::set_regName() { int i = 0; Register reg = ::as_Register(0); for ( ; i < ConcreteRegisterImpl::max_gpr ; ) { @@ -42,26 +41,22 @@ assert(i == ConcreteRegisterImpl::number_of_registers, "fix this"); } -bool VMRegImpl::is_Register() -{ +bool VMRegImpl::is_Register() { return value() >= 0 && value() < ConcreteRegisterImpl::max_gpr; } -bool VMRegImpl::is_FloatRegister() -{ +bool VMRegImpl::is_FloatRegister() { return value() >= ConcreteRegisterImpl::max_gpr && value() < ConcreteRegisterImpl::max_fpr; } -Register VMRegImpl::as_Register() -{ +Register VMRegImpl::as_Register() { assert(is_Register(), "must be"); return ::as_Register(value()); } -FloatRegister VMRegImpl::as_FloatRegister() -{ +FloatRegister VMRegImpl::as_FloatRegister() { assert(is_FloatRegister(), "must be" ); return ::as_FloatRegister(value() - ConcreteRegisterImpl::max_gpr); }
--- a/ports/hotspot/src/cpu/zero/vm/vmreg_zero.inline.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/vmreg_zero.inline.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -22,11 +22,11 @@ * have any questions. * */ -inline VMReg RegisterImpl::as_VMReg() -{ + +inline VMReg RegisterImpl::as_VMReg() { return VMRegImpl::as_VMReg(encoding()); } -inline VMReg FloatRegisterImpl::as_VMReg() -{ + +inline VMReg FloatRegisterImpl::as_VMReg() { return VMRegImpl::as_VMReg(encoding() + ConcreteRegisterImpl::max_gpr); }
--- a/ports/hotspot/src/cpu/zero/vm/vtableStubs_zero.cpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/cpu/zero/vm/vtableStubs_zero.cpp Thu Sep 03 11:23:31 2009 -0400 @@ -26,22 +26,18 @@ #include "incls/_precompiled.incl" #include "incls/_vtableStubs_zero.cpp.incl" -VtableStub* VtableStubs::create_vtable_stub(int vtable_index) -{ +VtableStub* VtableStubs::create_vtable_stub(int vtable_index) { Unimplemented(); } -VtableStub* VtableStubs::create_itable_stub(int vtable_index) -{ +VtableStub* VtableStubs::create_itable_stub(int vtable_index) { Unimplemented(); } -int VtableStub::pd_code_size_limit(bool is_vtable_stub) -{ +int VtableStub::pd_code_size_limit(bool is_vtable_stub) { Unimplemented(); } -int VtableStub::pd_code_alignment() -{ +int VtableStub::pd_code_alignment() { Unimplemented(); }
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -41,8 +41,7 @@ * */ -static inline int __m68k_cmpxchg(int oldval, int newval, volatile int *ptr) -{ +static inline int __m68k_cmpxchg(int oldval, int newval, volatile int *ptr) { int ret; __asm __volatile ("cas%.l %0,%2,%1" : "=d" (ret), "+m" (*(ptr)) @@ -55,10 +54,8 @@ `*PTR' before the operation.*/ static inline int m68k_compare_and_swap(volatile int *ptr, int oldval, - int newval) -{ - for (;;) - { + int newval) { + for (;;) { int prev = *ptr; if (prev != oldval) return prev; @@ -72,10 +69,8 @@ } /* Atomically add an int to memory. */ -static inline int m68k_add_and_fetch(volatile int *ptr, int add_value) -{ - for (;;) - { +static inline int m68k_add_and_fetch(volatile int *ptr, int add_value) { + for (;;) { // Loop until success. int prev = *ptr; @@ -87,10 +82,8 @@ /* Atomically write VALUE into `*PTR' and returns the previous contents of `*PTR'. */ -static inline int m68k_lock_test_and_set(volatile int *ptr, int newval) -{ - for (;;) - { +static inline int m68k_lock_test_and_set(volatile int *ptr, int newval) { + for (;;) { // Loop until success. int prev = *ptr; @@ -122,10 +115,8 @@ `*PTR' before the operation.*/ static inline int arm_compare_and_swap(volatile int *ptr, int oldval, - int newval) -{ - for (;;) - { + int newval) { + for (;;) { int prev = *ptr; if (prev != oldval) return prev; @@ -139,10 +130,8 @@ } /* Atomically add an int to memory. */ -static inline int arm_add_and_fetch(volatile int *ptr, int add_value) -{ - for (;;) - { +static inline int arm_add_and_fetch(volatile int *ptr, int add_value) { + for (;;) { // Loop until a __kernel_cmpxchg succeeds. int prev = *ptr; @@ -154,10 +143,8 @@ /* Atomically write VALUE into `*PTR' and returns the previous contents of `*PTR'. */ -static inline int arm_lock_test_and_set(volatile int *ptr, int newval) -{ - for (;;) - { +static inline int arm_lock_test_and_set(volatile int *ptr, int newval) { + for (;;) { // Loop until a __kernel_cmpxchg succeeds. int prev = *ptr; @@ -167,18 +154,15 @@ } #endif // ARM -inline void Atomic::store(jint store_value, volatile jint* dest) -{ +inline void Atomic::store(jint store_value, volatile jint* dest) { *dest = store_value; } -inline void Atomic::store_ptr(intptr_t store_value, intptr_t* dest) -{ +inline void Atomic::store_ptr(intptr_t store_value, intptr_t* dest) { *dest = store_value; } -inline jint Atomic::add(jint add_value, volatile jint* dest) -{ +inline jint Atomic::add(jint add_value, volatile jint* dest) { #ifdef ARM return arm_add_and_fetch(dest, add_value); #else @@ -190,8 +174,7 @@ #endif // ARM } -inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) -{ +inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) { #ifdef ARM return arm_add_and_fetch(dest, add_value); #else @@ -203,43 +186,35 @@ #endif // ARM } -inline void* Atomic::add_ptr(intptr_t add_value, volatile void* dest) -{ +inline void* Atomic::add_ptr(intptr_t add_value, volatile void* dest) { return (void *) add_ptr(add_value, (volatile intptr_t *) dest); } -inline void Atomic::inc(volatile jint* dest) -{ +inline void Atomic::inc(volatile jint* dest) { add(1, dest); } -inline void Atomic::inc_ptr(volatile intptr_t* dest) -{ +inline void Atomic::inc_ptr(volatile intptr_t* dest) { add_ptr(1, dest); } -inline void Atomic::inc_ptr(volatile void* dest) -{ +inline void Atomic::inc_ptr(volatile void* dest) { add_ptr(1, dest); } -inline void Atomic::dec(volatile jint* dest) -{ +inline void Atomic::dec(volatile jint* dest) { add(-1, dest); } -inline void Atomic::dec_ptr(volatile intptr_t* dest) -{ +inline void Atomic::dec_ptr(volatile intptr_t* dest) { add_ptr(-1, dest); } -inline void Atomic::dec_ptr(volatile void* dest) -{ +inline void Atomic::dec_ptr(volatile void* dest) { add_ptr(-1, dest); } -inline jint Atomic::xchg(jint exchange_value, volatile jint* dest) -{ +inline jint Atomic::xchg(jint exchange_value, volatile jint* dest) { #ifdef ARM return arm_lock_test_and_set(dest, exchange_value); #else @@ -268,8 +243,7 @@ #endif // ARM } -inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest) -{ +inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest) { return (void *) xchg_ptr((intptr_t) exchange_value, (volatile intptr_t*) dest); }
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/bytes_linux_zero.inline.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/os_cpu/linux_zero/vm/bytes_linux_zero.inline.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -27,17 +27,14 @@ #include <byteswap.h> -inline u2 Bytes::swap_u2(u2 x) -{ +inline u2 Bytes::swap_u2(u2 x) { return bswap_16(x); } -inline u4 Bytes::swap_u4(u4 x) -{ +inline u4 Bytes::swap_u4(u4 x) { return bswap_32(x); } -inline u8 Bytes::swap_u8(u8 x) -{ +inline u8 Bytes::swap_u8(u8 x) { return bswap_64(x); }
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/orderAccess_linux_zero.inline.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/os_cpu/linux_zero/vm/orderAccess_linux_zero.inline.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -66,26 +66,22 @@ inline void OrderAccess::loadstore() { acquire(); } inline void OrderAccess::storeload() { fence(); } -inline void OrderAccess::acquire() -{ +inline void OrderAccess::acquire() { READ_MEM_BARRIER; } -inline void OrderAccess::release() -{ +inline void OrderAccess::release() { WRITE_MEM_BARRIER; } -inline void OrderAccess::fence() -{ +inline void OrderAccess::fence() { FULL_MEM_BARRIER; } inline jbyte OrderAccess::load_acquire(volatile jbyte* p) { jbyte data = *p; acquire(); return data; } inline jshort OrderAccess::load_acquire(volatile jshort* p) { jshort data = *p; acquire(); return data; } inline jint OrderAccess::load_acquire(volatile jint* p) { jint data = *p; acquire(); return data; } -inline jlong OrderAccess::load_acquire(volatile jlong* p) -{ +inline jlong OrderAccess::load_acquire(volatile jlong* p) { jlong tmp; os::atomic_copy64(p, &tmp); acquire(); @@ -94,36 +90,31 @@ inline jubyte OrderAccess::load_acquire(volatile jubyte* p) { jubyte data = *p; acquire(); return data; } inline jushort OrderAccess::load_acquire(volatile jushort* p) { jushort data = *p; acquire(); return data; } inline juint OrderAccess::load_acquire(volatile juint* p) { juint data = *p; acquire(); return data; } -inline julong OrderAccess::load_acquire(volatile julong* p) -{ +inline julong OrderAccess::load_acquire(volatile julong* p) { julong tmp; os::atomic_copy64(p, &tmp); acquire(); return tmp; } inline jfloat OrderAccess::load_acquire(volatile jfloat* p) { jfloat data = *p; acquire(); return data; } -inline jdouble OrderAccess::load_acquire(volatile jdouble* p) -{ +inline jdouble OrderAccess::load_acquire(volatile jdouble* p) { jdouble tmp; os::atomic_copy64(p, &tmp); acquire(); return tmp; } -inline intptr_t OrderAccess::load_ptr_acquire(volatile intptr_t* p) -{ +inline intptr_t OrderAccess::load_ptr_acquire(volatile intptr_t* p) { intptr_t data = *p; acquire(); return data; } -inline void* OrderAccess::load_ptr_acquire(volatile void* p) -{ +inline void* OrderAccess::load_ptr_acquire(volatile void* p) { void *data = *(void* volatile *)p; acquire(); return data; } -inline void* OrderAccess::load_ptr_acquire(const volatile void* p) -{ +inline void* OrderAccess::load_ptr_acquire(const volatile void* p) { void *data = *(void* const volatile *)p; acquire(); return data;
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp Thu Sep 03 11:23:31 2009 -0400 @@ -26,24 +26,20 @@ // do not include precompiled header file #include "incls/_os_linux_zero.cpp.incl" -address os::current_stack_pointer() -{ +address os::current_stack_pointer() { address dummy = (address) &dummy; return dummy; } -frame os::get_sender_for_C_frame(frame* fr) -{ +frame os::get_sender_for_C_frame(frame* fr) { Unimplemented(); } -frame os::current_frame() -{ +frame os::current_frame() { Unimplemented(); } -char* os::non_memory_address_word() -{ +char* os::non_memory_address_word() { // Must never look like an address returned by reserve_memory, // even in its subfields (as defined by the CPU immediate fields, // if the CPU splits constants across multiple instructions). @@ -57,13 +53,11 @@ #endif // SPARC } -void os::initialize_thread() -{ +void os::initialize_thread() { // Nothing to do. } -address os::Linux::ucontext_get_pc(ucontext_t* uc) -{ +address os::Linux::ucontext_get_pc(ucontext_t* uc) { Unimplemented(); } @@ -73,8 +67,7 @@ Unimplemented(); } -frame os::fetch_frame_from_context(void* ucVoid) -{ +frame os::fetch_frame_from_context(void* ucVoid) { Unimplemented(); } @@ -86,8 +79,7 @@ JVM_handle_linux_signal(int sig, siginfo_t* info, void* ucVoid, - int abort_if_unrecognized) -{ + int abort_if_unrecognized) { ucontext_t* uc = (ucontext_t*) ucVoid; #if defined(PRODUCT) && defined(HOTSPOT_ASM) @@ -233,23 +225,19 @@ fatal(buf); } -void os::Linux::init_thread_fpu_state(void) -{ +void os::Linux::init_thread_fpu_state(void) { // Nothing to do } -int os::Linux::get_fpu_control_word() -{ +int os::Linux::get_fpu_control_word() { Unimplemented(); } -void os::Linux::set_fpu_control_word(int fpu) -{ +void os::Linux::set_fpu_control_word(int fpu) { Unimplemented(); } -bool os::is_allocatable(size_t bytes) -{ +bool os::is_allocatable(size_t bytes) { Unimplemented(); } @@ -258,13 +246,11 @@ size_t os::Linux::min_stack_allowed = 64 * K; -bool os::Linux::supports_variable_stack_size() -{ +bool os::Linux::supports_variable_stack_size() { return true; } -size_t os::Linux::default_stack_size(os::ThreadType thr_type) -{ +size_t os::Linux::default_stack_size(os::ThreadType thr_type) { #ifdef _LP64 size_t s = (thr_type == os::compiler_thread ? 4 * M : 1 * M); #else @@ -273,15 +259,13 @@ return s; } -size_t os::Linux::default_guard_size(os::ThreadType thr_type) -{ +size_t os::Linux::default_guard_size(os::ThreadType thr_type) { // Only enable glibc guard pages for non-Java threads // (Java threads have HotSpot guard pages) return (thr_type == java_thread ? 0 : page_size()); } -static void current_stack_region(address *bottom, size_t *size) -{ +static void current_stack_region(address *bottom, size_t *size) { pthread_attr_t attr; int res = pthread_getattr_np(pthread_self(), &attr); if (res != 0) { @@ -349,16 +333,14 @@ *size = stack_top - stack_bottom; } -address os::current_stack_base() -{ +address os::current_stack_base() { address bottom; size_t size; current_stack_region(&bottom, &size); return bottom + size; } -size_t os::current_stack_size() -{ +size_t os::current_stack_size() { // stack size includes normal stack and HotSpot guard pages address bottom; size_t size; @@ -369,8 +351,7 @@ ///////////////////////////////////////////////////////////////////////////// // helper functions for fatal error handler -void os::print_context(outputStream* st, void* context) -{ +void os::print_context(outputStream* st, void* context) { Unimplemented(); } @@ -379,25 +360,21 @@ // You probably want to disassemble these monkeys to check they're ok. extern "C" { - int SpinPause() - { + int SpinPause() { } - int SafeFetch32(int *adr, int errValue) - { + int SafeFetch32(int *adr, int errValue) { int value = errValue; value = *adr; return value; } - intptr_t SafeFetchN(intptr_t *adr, intptr_t errValue) - { + intptr_t SafeFetchN(intptr_t *adr, intptr_t errValue) { intptr_t value = errValue; value = *adr; return value; } - void _Copy_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) - { + void _Copy_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) { if (from > to) { jshort *end = from + count; while (from < end) @@ -411,8 +388,7 @@ *(to--) = *(from--); } } - void _Copy_conjoint_jints_atomic(jint* from, jint* to, size_t count) - { + void _Copy_conjoint_jints_atomic(jint* from, jint* to, size_t count) { if (from > to) { jint *end = from + count; while (from < end) @@ -426,8 +402,7 @@ *(to--) = *(from--); } } - void _Copy_conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) - { + void _Copy_conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) { if (from > to) { jlong *end = from + count; while (from < end) @@ -442,20 +417,24 @@ } } - void _Copy_arrayof_conjoint_bytes(HeapWord* from, HeapWord* to, size_t count) - { + void _Copy_arrayof_conjoint_bytes(HeapWord* from, + HeapWord* to, + size_t count) { Unimplemented(); } - void _Copy_arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, - size_t count) { + void _Copy_arrayof_conjoint_jshorts(HeapWord* from, + HeapWord* to, + size_t count) { Unimplemented(); } - void _Copy_arrayof_conjoint_jints(HeapWord* from, HeapWord* to, size_t count) - { + void _Copy_arrayof_conjoint_jints(HeapWord* from, + HeapWord* to, + size_t count) { Unimplemented(); } - void _Copy_arrayof_conjoint_jlongs(HeapWord* from, HeapWord* to, - size_t count) { + void _Copy_arrayof_conjoint_jlongs(HeapWord* from, + HeapWord* to, + size_t count) { Unimplemented(); } }; @@ -469,8 +448,7 @@ long long unsigned int __sync_val_compare_and_swap_8( volatile void *ptr, long long unsigned int oldval, - long long unsigned int newval) - { + long long unsigned int newval) { Unimplemented(); } };
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -32,8 +32,7 @@ static bool register_code_area(char *low, char *high) { return true; } // Atomically copy 64 bits of data - static void atomic_copy64(volatile void *src, volatile void *dst) - { + static void atomic_copy64(volatile void *src, volatile void *dst) { #if defined(PPC) && !defined(_LP64) double tmp; asm volatile ("lfd %0, 0(%1)\n"
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/prefetch_linux_zero.inline.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/os_cpu/linux_zero/vm/prefetch_linux_zero.inline.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -23,10 +23,8 @@ * */ -inline void Prefetch::read(void* loc, intx interval) -{ +inline void Prefetch::read(void* loc, intx interval) { } -inline void Prefetch::write(void* loc, intx interval) -{ +inline void Prefetch::write(void* loc, intx interval) { }
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/threadLS_linux_zero.cpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/os_cpu/linux_zero/vm/threadLS_linux_zero.cpp Thu Sep 03 11:23:31 2009 -0400 @@ -26,17 +26,14 @@ #include "incls/_precompiled.incl" #include "incls/_threadLS_linux_zero.cpp.incl" -void ThreadLocalStorage::generate_code_for_get_thread() -{ +void ThreadLocalStorage::generate_code_for_get_thread() { // nothing to do } -void ThreadLocalStorage::pd_init() -{ +void ThreadLocalStorage::pd_init() { // nothing to do } -void ThreadLocalStorage::pd_set_thread(Thread* thread) -{ +void ThreadLocalStorage::pd_set_thread(Thread* thread) { os::thread_local_storage_at_put(ThreadLocalStorage::thread_index(), thread); }
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/threadLS_linux_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/os_cpu/linux_zero/vm/threadLS_linux_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -24,9 +24,7 @@ // Processor dependent parts of ThreadLocalStorage -public: - - static Thread* thread() - { + public: + static Thread* thread() { return (Thread*) os::thread_local_storage_at(thread_index()); }
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp Thu Sep 03 09:03:41 2009 -0400 +++ b/ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp Thu Sep 03 11:23:31 2009 -0400 @@ -27,69 +27,57 @@ ZeroStack _zero_stack; ZeroFrame* _top_zero_frame; - void pd_initialize() - { + void pd_initialize() { _top_zero_frame = NULL; } public: - ZeroStack *zero_stack() - { + ZeroStack *zero_stack() { return &_zero_stack; } public: - ZeroFrame *top_zero_frame() - { + ZeroFrame *top_zero_frame() { return _top_zero_frame; } - void push_zero_frame(ZeroFrame *frame) - { + void push_zero_frame(ZeroFrame *frame) { *(ZeroFrame **) frame = _top_zero_frame; _top_zero_frame = frame; } - void pop_zero_frame() - { + void pop_zero_frame() { _zero_stack.set_sp((intptr_t *) _top_zero_frame + 1); _top_zero_frame = *(ZeroFrame **) _top_zero_frame; } public: - static ByteSize zero_stack_offset() - { + static ByteSize zero_stack_offset() { return byte_offset_of(JavaThread, _zero_stack); } - static ByteSize top_zero_frame_offset() - { + static ByteSize top_zero_frame_offset() { return byte_offset_of(JavaThread, _top_zero_frame); } public: - void record_base_of_stack_pointer() - { + void record_base_of_stack_pointer() { assert(top_zero_frame() == NULL, "junk on stack prior to Java call"); } - void set_base_of_stack_pointer(intptr_t* base_sp) - { + void set_base_of_stack_pointer(intptr_t* base_sp) { assert(base_sp == NULL, "should be"); assert(top_zero_frame() == NULL, "junk on stack after Java call"); } public: - void set_last_Java_frame() - { + void set_last_Java_frame() { JavaFrameAnchor *jfa = frame_anchor(); jfa->set_last_Java_sp((intptr_t *) top_zero_frame()); } - void reset_last_Java_frame() - { + void reset_last_Java_frame() { JavaFrameAnchor *jfa = frame_anchor(); jfa->set_last_Java_sp(NULL); } private: - frame pd_last_frame() - { + frame pd_last_frame() { assert(has_last_Java_frame(), "must have last_Java_sp() when suspended"); return frame(last_Java_sp()); } @@ -98,16 +86,14 @@ // Check for pending suspend requests and pending asynchronous // exceptions. There are separate accessors for these, but // _suspend_flags is volatile so using them would be unsafe. - bool has_special_condition_for_native_trans() - { + bool has_special_condition_for_native_trans() { return _suspend_flags != 0; } public: bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, - bool isInJava) - { + bool isInJava) { Unimplemented(); }