Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: src/objects-inl.h

Issue 6995127: MIPS: port A collection of context-related refactoring changes. (Closed)
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 Page::FromAddress(object->address())-> \ 883 Page::FromAddress(object->address())-> \
884 IsRegionDirty(object->address() + offset)); \ 884 IsRegionDirty(object->address() + offset)); \
885 } 885 }
886 886
887 #ifndef V8_TARGET_ARCH_MIPS 887 #ifndef V8_TARGET_ARCH_MIPS
888 #define READ_DOUBLE_FIELD(p, offset) \ 888 #define READ_DOUBLE_FIELD(p, offset) \
889 (*reinterpret_cast<double*>(FIELD_ADDR(p, offset))) 889 (*reinterpret_cast<double*>(FIELD_ADDR(p, offset)))
890 #else // V8_TARGET_ARCH_MIPS 890 #else // V8_TARGET_ARCH_MIPS
891 // Prevent gcc from using load-double (mips ldc1) on (possibly) 891 // Prevent gcc from using load-double (mips ldc1) on (possibly)
892 // non-64-bit aligned HeapNumber::value. 892 // non-64-bit aligned HeapNumber::value.
893 static inline double read_double_field(HeapNumber* p, int offset) { 893 static inline double read_double_field(void* p, int offset) {
894 union conversion { 894 union conversion {
895 double d; 895 double d;
896 uint32_t u[2]; 896 uint32_t u[2];
897 } c; 897 } c;
898 c.u[0] = (*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset))); 898 c.u[0] = (*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset)));
899 c.u[1] = (*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset + 4))); 899 c.u[1] = (*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset + 4)));
900 return c.d; 900 return c.d;
901 } 901 }
902 #define READ_DOUBLE_FIELD(p, offset) read_double_field(p, offset) 902 #define READ_DOUBLE_FIELD(p, offset) read_double_field(p, offset)
903 #endif // V8_TARGET_ARCH_MIPS 903 #endif // V8_TARGET_ARCH_MIPS
904 904
905 905
906 #ifndef V8_TARGET_ARCH_MIPS 906 #ifndef V8_TARGET_ARCH_MIPS
907 #define WRITE_DOUBLE_FIELD(p, offset, value) \ 907 #define WRITE_DOUBLE_FIELD(p, offset, value) \
908 (*reinterpret_cast<double*>(FIELD_ADDR(p, offset)) = value) 908 (*reinterpret_cast<double*>(FIELD_ADDR(p, offset)) = value)
909 #else // V8_TARGET_ARCH_MIPS 909 #else // V8_TARGET_ARCH_MIPS
910 // Prevent gcc from using store-double (mips sdc1) on (possibly) 910 // Prevent gcc from using store-double (mips sdc1) on (possibly)
911 // non-64-bit aligned HeapNumber::value. 911 // non-64-bit aligned HeapNumber::value.
912 static inline void write_double_field(HeapNumber* p, int offset, 912 static inline void write_double_field(void* p, int offset,
913 double value) { 913 double value) {
914 union conversion { 914 union conversion {
915 double d; 915 double d;
916 uint32_t u[2]; 916 uint32_t u[2];
917 } c; 917 } c;
918 c.d = value; 918 c.d = value;
919 (*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset))) = c.u[0]; 919 (*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset))) = c.u[0];
920 (*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset + 4))) = c.u[1]; 920 (*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset + 4))) = c.u[1];
921 } 921 }
922 #define WRITE_DOUBLE_FIELD(p, offset, value) \ 922 #define WRITE_DOUBLE_FIELD(p, offset, value) \
(...skipping 3487 matching lines...) Expand 10 before | Expand all | Expand 10 after
4410 #undef WRITE_INT_FIELD 4410 #undef WRITE_INT_FIELD
4411 #undef READ_SHORT_FIELD 4411 #undef READ_SHORT_FIELD
4412 #undef WRITE_SHORT_FIELD 4412 #undef WRITE_SHORT_FIELD
4413 #undef READ_BYTE_FIELD 4413 #undef READ_BYTE_FIELD
4414 #undef WRITE_BYTE_FIELD 4414 #undef WRITE_BYTE_FIELD
4415 4415
4416 4416
4417 } } // namespace v8::internal 4417 } } // namespace v8::internal
4418 4418
4419 #endif // V8_OBJECTS_INL_H_ 4419 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698