| 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 5595 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5606 | 5606 | 
| 5607 | 5607 | 
| 5608 TEST(fcmp) { | 5608 TEST(fcmp) { | 
| 5609   INIT_V8(); | 5609   INIT_V8(); | 
| 5610   SETUP(); | 5610   SETUP(); | 
| 5611 | 5611 | 
| 5612   START(); | 5612   START(); | 
| 5613 | 5613 | 
| 5614   // Some of these tests require a floating-point scratch register assigned to | 5614   // Some of these tests require a floating-point scratch register assigned to | 
| 5615   // the macro assembler, but most do not. | 5615   // the macro assembler, but most do not. | 
| 5616   __ SetFPScratchRegister(NoFPReg); | 5616   { | 
|  | 5617     // We're going to mess around with the available scratch registers in this | 
|  | 5618     // test. A UseScratchRegisterScope will make sure that they are restored to | 
|  | 5619     // the default values once we're finished. | 
|  | 5620     UseScratchRegisterScope temps(&masm); | 
|  | 5621     masm.FPTmpList()->set_list(0); | 
| 5617 | 5622 | 
| 5618   __ Fmov(s8, 0.0); | 5623     __ Fmov(s8, 0.0); | 
| 5619   __ Fmov(s9, 0.5); | 5624     __ Fmov(s9, 0.5); | 
| 5620   __ Mov(w18, 0x7f800001);  // Single precision NaN. | 5625     __ Mov(w18, 0x7f800001);  // Single precision NaN. | 
| 5621   __ Fmov(s18, w18); | 5626     __ Fmov(s18, w18); | 
| 5622 | 5627 | 
| 5623   __ Fcmp(s8, s8); | 5628     __ Fcmp(s8, s8); | 
| 5624   __ Mrs(x0, NZCV); | 5629     __ Mrs(x0, NZCV); | 
| 5625   __ Fcmp(s8, s9); | 5630     __ Fcmp(s8, s9); | 
| 5626   __ Mrs(x1, NZCV); | 5631     __ Mrs(x1, NZCV); | 
| 5627   __ Fcmp(s9, s8); | 5632     __ Fcmp(s9, s8); | 
| 5628   __ Mrs(x2, NZCV); | 5633     __ Mrs(x2, NZCV); | 
| 5629   __ Fcmp(s8, s18); | 5634     __ Fcmp(s8, s18); | 
| 5630   __ Mrs(x3, NZCV); | 5635     __ Mrs(x3, NZCV); | 
| 5631   __ Fcmp(s18, s18); | 5636     __ Fcmp(s18, s18); | 
| 5632   __ Mrs(x4, NZCV); | 5637     __ Mrs(x4, NZCV); | 
| 5633   __ Fcmp(s8, 0.0); | 5638     __ Fcmp(s8, 0.0); | 
| 5634   __ Mrs(x5, NZCV); | 5639     __ Mrs(x5, NZCV); | 
| 5635   __ SetFPScratchRegister(d0); | 5640     masm.FPTmpList()->set_list(d0.Bit()); | 
| 5636   __ Fcmp(s8, 255.0); | 5641     __ Fcmp(s8, 255.0); | 
| 5637   __ SetFPScratchRegister(NoFPReg); | 5642     masm.FPTmpList()->set_list(0); | 
| 5638   __ Mrs(x6, NZCV); | 5643     __ Mrs(x6, NZCV); | 
| 5639 | 5644 | 
| 5640   __ Fmov(d19, 0.0); | 5645     __ Fmov(d19, 0.0); | 
| 5641   __ Fmov(d20, 0.5); | 5646     __ Fmov(d20, 0.5); | 
| 5642   __ Mov(x21, 0x7ff0000000000001UL);   // Double precision NaN. | 5647     __ Mov(x21, 0x7ff0000000000001UL);   // Double precision NaN. | 
| 5643   __ Fmov(d21, x21); | 5648     __ Fmov(d21, x21); | 
| 5644 | 5649 | 
| 5645   __ Fcmp(d19, d19); | 5650     __ Fcmp(d19, d19); | 
| 5646   __ Mrs(x10, NZCV); | 5651     __ Mrs(x10, NZCV); | 
| 5647   __ Fcmp(d19, d20); | 5652     __ Fcmp(d19, d20); | 
| 5648   __ Mrs(x11, NZCV); | 5653     __ Mrs(x11, NZCV); | 
| 5649   __ Fcmp(d20, d19); | 5654     __ Fcmp(d20, d19); | 
| 5650   __ Mrs(x12, NZCV); | 5655     __ Mrs(x12, NZCV); | 
| 5651   __ Fcmp(d19, d21); | 5656     __ Fcmp(d19, d21); | 
| 5652   __ Mrs(x13, NZCV); | 5657     __ Mrs(x13, NZCV); | 
| 5653   __ Fcmp(d21, d21); | 5658     __ Fcmp(d21, d21); | 
| 5654   __ Mrs(x14, NZCV); | 5659     __ Mrs(x14, NZCV); | 
| 5655   __ Fcmp(d19, 0.0); | 5660     __ Fcmp(d19, 0.0); | 
| 5656   __ Mrs(x15, NZCV); | 5661     __ Mrs(x15, NZCV); | 
| 5657   __ SetFPScratchRegister(d0); | 5662     masm.FPTmpList()->set_list(d0.Bit()); | 
| 5658   __ Fcmp(d19, 12.3456); | 5663     __ Fcmp(d19, 12.3456); | 
| 5659   __ SetFPScratchRegister(NoFPReg); | 5664     masm.FPTmpList()->set_list(0); | 
| 5660   __ Mrs(x16, NZCV); | 5665     __ Mrs(x16, NZCV); | 
|  | 5666   } | 
|  | 5667 | 
| 5661   END(); | 5668   END(); | 
| 5662 | 5669 | 
| 5663   RUN(); | 5670   RUN(); | 
| 5664 | 5671 | 
| 5665   ASSERT_EQUAL_32(ZCFlag, w0); | 5672   ASSERT_EQUAL_32(ZCFlag, w0); | 
| 5666   ASSERT_EQUAL_32(NFlag, w1); | 5673   ASSERT_EQUAL_32(NFlag, w1); | 
| 5667   ASSERT_EQUAL_32(CFlag, w2); | 5674   ASSERT_EQUAL_32(CFlag, w2); | 
| 5668   ASSERT_EQUAL_32(CVFlag, w3); | 5675   ASSERT_EQUAL_32(CVFlag, w3); | 
| 5669   ASSERT_EQUAL_32(CVFlag, w4); | 5676   ASSERT_EQUAL_32(CVFlag, w4); | 
| 5670   ASSERT_EQUAL_32(ZCFlag, w5); | 5677   ASSERT_EQUAL_32(ZCFlag, w5); | 
| (...skipping 4344 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 10015   AbsHelperX(-42); | 10022   AbsHelperX(-42); | 
| 10016   AbsHelperX(kXMinInt); | 10023   AbsHelperX(kXMinInt); | 
| 10017   AbsHelperX(kXMaxInt); | 10024   AbsHelperX(kXMaxInt); | 
| 10018 | 10025 | 
| 10019   AbsHelperW(0); | 10026   AbsHelperW(0); | 
| 10020   AbsHelperW(42); | 10027   AbsHelperW(42); | 
| 10021   AbsHelperW(-42); | 10028   AbsHelperW(-42); | 
| 10022   AbsHelperW(kWMinInt); | 10029   AbsHelperW(kWMinInt); | 
| 10023   AbsHelperW(kWMaxInt); | 10030   AbsHelperW(kWMaxInt); | 
| 10024 } | 10031 } | 
| OLD | NEW | 
|---|