< prev index next >

src/cpu/x86/vm/bytes_x86.hpp

Print this page

        

@@ -41,11 +41,11 @@
   static inline T get_native(const void* p) {
     assert(p != NULL, "null pointer");
 
     T x;
 
-    if (is_ptr_aligned(p, sizeof(T))) {
+    if (is_aligned(p, sizeof(T))) {
       x = *(T*)p;
     } else {
       memcpy(&x, p, sizeof(T));
     }
 

@@ -54,11 +54,11 @@
 
   template <typename T>
   static inline void put_native(void* p, T x) {
     assert(p != NULL, "null pointer");
 
-    if (is_ptr_aligned(p, sizeof(T))) {
+    if (is_aligned(p, sizeof(T))) {
       *(T*)p = x;
     } else {
       memcpy(p, &x, sizeof(T));
     }
   }
< prev index next >