comparison src/cpu/ppc/vm/bytes_ppc.hpp @ 14445:67fa91961822

8029940: PPC64 (part 122): C2 compiler port Reviewed-by: kvn
author goetz
date Wed, 11 Dec 2013 00:06:11 +0100
parents ec28f9c041ff
children 56e7f5560e60
comparison
equal deleted inserted replaced
14444:492e67693373 14445:67fa91961822
31 class Bytes: AllStatic { 31 class Bytes: AllStatic {
32 public: 32 public:
33 // Efficient reading and writing of unaligned unsigned data in platform-specific byte ordering 33 // Efficient reading and writing of unaligned unsigned data in platform-specific byte ordering
34 // PowerPC needs to check for alignment. 34 // PowerPC needs to check for alignment.
35 35
36 // can I count on address always being a pointer to an unsigned char? Yes 36 // Can I count on address always being a pointer to an unsigned char? Yes.
37 37
38 // Returns true, if the byte ordering used by Java is different from the nativ byte ordering 38 // Returns true, if the byte ordering used by Java is different from the nativ byte ordering
39 // of the underlying machine. For example, true for Intel x86, False, for Solaris on Sparc. 39 // of the underlying machine. For example, true for Intel x86, False, for Solaris on Sparc.
40 static inline bool is_Java_byte_ordering_different() { return false; } 40 static inline bool is_Java_byte_ordering_different() { return false; }
41 41
139 ((u1*)p)[6] = x >> 8; 139 ((u1*)p)[6] = x >> 8;
140 ((u1*)p)[7] = x; 140 ((u1*)p)[7] = x;
141 } 141 }
142 } 142 }
143 143
144
145 // Efficient reading and writing of unaligned unsigned data in Java byte ordering (i.e. big-endian ordering) 144 // Efficient reading and writing of unaligned unsigned data in Java byte ordering (i.e. big-endian ordering)
146 // (no byte-order reversal is needed since Power CPUs are big-endian oriented). 145 // (no byte-order reversal is needed since Power CPUs are big-endian oriented).
147 static inline u2 get_Java_u2(address p) { return get_native_u2(p); } 146 static inline u2 get_Java_u2(address p) { return get_native_u2(p); }
148 static inline u4 get_Java_u4(address p) { return get_native_u4(p); } 147 static inline u4 get_Java_u4(address p) { return get_native_u4(p); }
149 static inline u8 get_Java_u8(address p) { return get_native_u8(p); } 148 static inline u8 get_Java_u8(address p) { return get_native_u8(p); }