Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 22 matching lines...) Expand all Loading... | |
| 33 #include "a64/constants-a64.h" | 33 #include "a64/constants-a64.h" |
| 34 #include "a64/utils-a64.h" | 34 #include "a64/utils-a64.h" |
| 35 | 35 |
| 36 namespace v8 { | 36 namespace v8 { |
| 37 namespace internal { | 37 namespace internal { |
| 38 | 38 |
| 39 | 39 |
| 40 // ISA constants. -------------------------------------------------------------- | 40 // ISA constants. -------------------------------------------------------------- |
| 41 | 41 |
| 42 typedef uint32_t Instr; | 42 typedef uint32_t Instr; |
| 43 const float kFP32PositiveInfinity = rawbits_to_float(0x7f800000); | 43 |
| 44 const float kFP32NegativeInfinity = rawbits_to_float(0xff800000); | 44 #if defined(A64_DEFINE_FP_STATICS) |
| 45 const double kFP64PositiveInfinity = rawbits_to_double(0x7ff0000000000000UL); | 45 #define DEFINE_FLOAT(name, value) extern const uint32_t name = value |
|
Rodolph Perfetta (ARM)
2014/02/06 11:51:21
did you mean to declare this extern and provide a
jochen (gone - plz use gerrit)
2014/02/06 11:59:47
no, that's not what will happen. The compiler will
Sven Panne
2014/02/06 12:08:48
http://media.giphy.com/media/3sjQViF0W1Mqs/giphy.g
| |
| 46 const double kFP64NegativeInfinity = rawbits_to_double(0xfff0000000000000UL); | 46 #define DEFINE_DOUBLE(name, value) extern const uint64_t name = value |
|
Rodolph Perfetta (ARM)
2014/02/06 11:51:21
same here.
| |
| 47 #else | |
| 48 #define DEFINE_FLOAT(name, value) extern const float name | |
| 49 #define DEFINE_DOUBLE(name, value) extern const double name | |
| 50 #endif // defined(A64_DEFINE_FP_STATICS) | |
| 51 | |
| 52 DEFINE_FLOAT(kFP32PositiveInfinity, 0x7f800000); | |
| 53 DEFINE_FLOAT(kFP32NegativeInfinity, 0xff800000); | |
| 54 DEFINE_DOUBLE(kFP64PositiveInfinity, 0x7ff0000000000000UL); | |
| 55 DEFINE_DOUBLE(kFP64NegativeInfinity, 0xfff0000000000000UL); | |
| 47 | 56 |
| 48 // This value is a signalling NaN as both a double and as a float (taking the | 57 // This value is a signalling NaN as both a double and as a float (taking the |
| 49 // least-significant word). | 58 // least-significant word). |
| 50 static const double kFP64SignallingNaN = rawbits_to_double(0x7ff000007f800001); | 59 DEFINE_DOUBLE(kFP64SignallingNaN, 0x7ff000007f800001); |
| 51 static const float kFP32SignallingNaN = rawbits_to_float(0x7f800001); | 60 DEFINE_FLOAT(kFP32SignallingNaN, 0x7f800001); |
| 52 | 61 |
| 53 // A similar value, but as a quiet NaN. | 62 // A similar value, but as a quiet NaN. |
| 54 static const double kFP64QuietNaN = rawbits_to_double(0x7ff800007fc00001); | 63 DEFINE_DOUBLE(kFP64QuietNaN, 0x7ff800007fc00001); |
| 55 static const float kFP32QuietNaN = rawbits_to_float(0x7fc00001); | 64 DEFINE_FLOAT(kFP32QuietNaN, 0x7fc00001); |
| 65 | |
| 66 #undef DEFINE_FLOAT | |
| 67 #undef DEFINE_DOUBLE | |
| 56 | 68 |
| 57 | 69 |
| 58 enum LSDataSize { | 70 enum LSDataSize { |
| 59 LSByte = 0, | 71 LSByte = 0, |
| 60 LSHalfword = 1, | 72 LSHalfword = 1, |
| 61 LSWord = 2, | 73 LSWord = 2, |
| 62 LSDoubleWord = 3 | 74 LSDoubleWord = 3 |
| 63 }; | 75 }; |
| 64 | 76 |
| 65 LSDataSize CalcLSPairDataSize(LoadStorePairOp op); | 77 LSDataSize CalcLSPairDataSize(LoadStorePairOp op); |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 460 TRACE_ENABLE = 1 << 6, | 472 TRACE_ENABLE = 1 << 6, |
| 461 TRACE_DISABLE = 2 << 6, | 473 TRACE_DISABLE = 2 << 6, |
| 462 TRACE_OVERRIDE = 3 << 6 | 474 TRACE_OVERRIDE = 3 << 6 |
| 463 }; | 475 }; |
| 464 | 476 |
| 465 | 477 |
| 466 } } // namespace v8::internal | 478 } } // namespace v8::internal |
| 467 | 479 |
| 468 | 480 |
| 469 #endif // V8_A64_INSTRUCTIONS_A64_H_ | 481 #endif // V8_A64_INSTRUCTIONS_A64_H_ |
| OLD | NEW |