 Chromium Code Reviews
 Chromium Code Reviews Issue 6368053:
  Implements DoubleToI on ARM. Refactor some VFP code at the same time and...  (Closed) 
  Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
    
  
    Issue 6368053:
  Implements DoubleToI on ARM. Refactor some VFP code at the same time and...  (Closed) 
  Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/| OLD | NEW | 
|---|---|
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 373 | 373 | 
| 374 | 374 | 
| 375 // Type of VFP register. Determines register encoding. | 375 // Type of VFP register. Determines register encoding. | 
| 376 enum VFPRegPrecision { | 376 enum VFPRegPrecision { | 
| 377 kSinglePrecision = 0, | 377 kSinglePrecision = 0, | 
| 378 kDoublePrecision = 1 | 378 kDoublePrecision = 1 | 
| 379 }; | 379 }; | 
| 380 | 380 | 
| 381 | 381 | 
| 382 // VFP FPSCR constants. | 382 // VFP FPSCR constants. | 
| 383 enum VFPConversionMode { | |
| 384 kFPSCRRounding = 0, | |
| 385 kDefaultRoundToZero = 1 | |
| 386 }; | |
| 387 | |
| 383 static const uint32_t kVFPExceptionMask = 0xf; | 388 static const uint32_t kVFPExceptionMask = 0xf; | 
| 384 static const uint32_t kVFPRoundingModeMask = 3 << 22; | |
| 385 static const uint32_t kVFPFlushToZeroMask = 1 << 24; | 389 static const uint32_t kVFPFlushToZeroMask = 1 << 24; | 
| 386 static const uint32_t kVFPRoundToMinusInfinityBits = 2 << 22; | |
| 387 static const uint32_t kVFPInvalidExceptionBit = 1; | 390 static const uint32_t kVFPInvalidExceptionBit = 1; | 
| 388 | 391 | 
| 389 static const uint32_t kVFPNConditionFlagBit = 1 << 31; | 392 static const uint32_t kVFPNConditionFlagBit = 1 << 31; | 
| 390 static const uint32_t kVFPZConditionFlagBit = 1 << 30; | 393 static const uint32_t kVFPZConditionFlagBit = 1 << 30; | 
| 391 static const uint32_t kVFPCConditionFlagBit = 1 << 29; | 394 static const uint32_t kVFPCConditionFlagBit = 1 << 29; | 
| 392 static const uint32_t kVFPVConditionFlagBit = 1 << 28; | 395 static const uint32_t kVFPVConditionFlagBit = 1 << 28; | 
| 393 | 396 | 
| 394 | 397 | 
| 395 // VFP rounding modes. See ARM DDI 0406B Page A2-29. | 398 // VFP rounding modes. See ARM DDI 0406B Page A2-29. | 
| 396 enum FPSCRRoundingModes { | 399 enum VFPRoundingMode { | 
| 397 RN, // Round to Nearest. | 400 RN = 0 << 22, // Round to Nearest. | 
| 398 RP, // Round towards Plus Infinity. | 401 RP = 1 << 22, // Round towards Plus Infinity. | 
| 399 RM, // Round towards Minus Infinity. | 402 RM = 2 << 22, // Round towards Minus Infinity. | 
| 400 RZ // Round towards zero. | 403 RZ = 3 << 22, // Round towards zero. | 
| 401 }; | |
| 402 | 404 | 
| 405 // Aliases. | |
| 406 kRoundToNearest = RN, | |
| 407 kRoundToPlusInf = RP, | |
| 408 kRoundToMinusInf = RM, | |
| 409 kRoundToZero = RZ | |
| 410 } | |
| 
Søren Thygesen Gjesse
2011/02/03 09:07:17
Remove a few empty lines.
 | |
| 411 | |
| 412 ; | |
| 413 | |
| 414 static const uint32_t kVFPRoundingModeMask = 3 << 22; | |
| 403 | 415 | 
| 404 // ----------------------------------------------------------------------------- | 416 // ----------------------------------------------------------------------------- | 
| 405 // Hints. | 417 // Hints. | 
| 406 | 418 | 
| 407 // Branch hints are not used on the ARM. They are defined so that they can | 419 // Branch hints are not used on the ARM. They are defined so that they can | 
| 408 // appear in shared function signatures, but will be ignored in ARM | 420 // appear in shared function signatures, but will be ignored in ARM | 
| 409 // implementations. | 421 // implementations. | 
| 410 enum Hint { no_hint }; | 422 enum Hint { no_hint }; | 
| 411 | 423 | 
| 412 // Hints are not used on the arm. Negating is trivial. | 424 // Hints are not used on the arm. Negating is trivial. | 
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 740 static int Number(const char* name, bool* is_double); | 752 static int Number(const char* name, bool* is_double); | 
| 741 | 753 | 
| 742 private: | 754 private: | 
| 743 static const char* names_[kNumVFPRegisters]; | 755 static const char* names_[kNumVFPRegisters]; | 
| 744 }; | 756 }; | 
| 745 | 757 | 
| 746 | 758 | 
| 747 } } // namespace v8::internal | 759 } } // namespace v8::internal | 
| 748 | 760 | 
| 749 #endif // V8_ARM_CONSTANTS_ARM_H_ | 761 #endif // V8_ARM_CONSTANTS_ARM_H_ | 
| OLD | NEW |