OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 4022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4033 __ ctc1(zero_reg, FCSR); | 4033 __ ctc1(zero_reg, FCSR); |
4034 | 4034 |
4035 #define GENERATE_CVT_TEST(x, y, z) \ | 4035 #define GENERATE_CVT_TEST(x, y, z) \ |
4036 __ y##c1(f0, MemOperand(a0, offsetof(TestFloat, x##_in))); \ | 4036 __ y##c1(f0, MemOperand(a0, offsetof(TestFloat, x##_in))); \ |
4037 __ x(f0, f0); \ | 4037 __ x(f0, f0); \ |
4038 __ nop(); \ | 4038 __ nop(); \ |
4039 __ z##c1(f0, MemOperand(a0, offsetof(TestFloat, x##_out))); | 4039 __ z##c1(f0, MemOperand(a0, offsetof(TestFloat, x##_out))); |
4040 | 4040 |
4041 GENERATE_CVT_TEST(cvt_d_s, lw, sd) | 4041 GENERATE_CVT_TEST(cvt_d_s, lw, sd) |
4042 GENERATE_CVT_TEST(cvt_d_w, lw, sd) | 4042 GENERATE_CVT_TEST(cvt_d_w, lw, sd) |
4043 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { | 4043 if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) && |
| 4044 IsFp64Mode()) { |
4044 GENERATE_CVT_TEST(cvt_d_l, ld, sd) | 4045 GENERATE_CVT_TEST(cvt_d_l, ld, sd) |
4045 } | 4046 } |
4046 | 4047 |
4047 if (IsFp64Mode()) { | 4048 if (IsFp64Mode()) { |
4048 GENERATE_CVT_TEST(cvt_l_s, lw, sd) | 4049 GENERATE_CVT_TEST(cvt_l_s, lw, sd) |
4049 GENERATE_CVT_TEST(cvt_l_d, ld, sd) | 4050 GENERATE_CVT_TEST(cvt_l_d, ld, sd) |
4050 } | 4051 } |
4051 | 4052 |
4052 GENERATE_CVT_TEST(cvt_s_d, ld, sw) | 4053 GENERATE_CVT_TEST(cvt_s_d, ld, sw) |
4053 GENERATE_CVT_TEST(cvt_s_w, lw, sw) | 4054 GENERATE_CVT_TEST(cvt_s_w, lw, sw) |
4054 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { | 4055 if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) && |
| 4056 IsFp64Mode()) { |
4055 GENERATE_CVT_TEST(cvt_s_l, ld, sw) | 4057 GENERATE_CVT_TEST(cvt_s_l, ld, sw) |
4056 } | 4058 } |
4057 | 4059 |
4058 GENERATE_CVT_TEST(cvt_w_s, lw, sw) | 4060 GENERATE_CVT_TEST(cvt_w_s, lw, sw) |
4059 GENERATE_CVT_TEST(cvt_w_d, ld, sw) | 4061 GENERATE_CVT_TEST(cvt_w_d, ld, sw) |
4060 | 4062 |
4061 // Restore FCSR. | 4063 // Restore FCSR. |
4062 __ ctc1(a1, FCSR); | 4064 __ ctc1(a1, FCSR); |
4063 | 4065 |
4064 __ jr(ra); | 4066 __ jr(ra); |
(...skipping 12 matching lines...) Expand all Loading... |
4077 test.cvt_l_d_in = -0.51; | 4079 test.cvt_l_d_in = -0.51; |
4078 test.cvt_s_d_in = -0.51; | 4080 test.cvt_s_d_in = -0.51; |
4079 test.cvt_s_w_in = -1; | 4081 test.cvt_s_w_in = -1; |
4080 test.cvt_s_l_in = -1; | 4082 test.cvt_s_l_in = -1; |
4081 test.cvt_w_s_in = -0.51; | 4083 test.cvt_w_s_in = -0.51; |
4082 test.cvt_w_d_in = -0.51; | 4084 test.cvt_w_d_in = -0.51; |
4083 | 4085 |
4084 (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0)); | 4086 (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0)); |
4085 CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in)); | 4087 CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in)); |
4086 CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in)); | 4088 CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in)); |
4087 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { | 4089 if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) && |
| 4090 IsFp64Mode()) { |
4088 CHECK_EQ(test.cvt_d_l_out, static_cast<double>(test.cvt_d_l_in)); | 4091 CHECK_EQ(test.cvt_d_l_out, static_cast<double>(test.cvt_d_l_in)); |
4089 } | 4092 } |
4090 if (IsFp64Mode()) { | 4093 if (IsFp64Mode()) { |
4091 CHECK_EQ(test.cvt_l_s_out, -1); | 4094 CHECK_EQ(test.cvt_l_s_out, -1); |
4092 CHECK_EQ(test.cvt_l_d_out, -1); | 4095 CHECK_EQ(test.cvt_l_d_out, -1); |
4093 } | 4096 } |
4094 CHECK_EQ(test.cvt_s_d_out, static_cast<float>(test.cvt_s_d_in)); | 4097 CHECK_EQ(test.cvt_s_d_out, static_cast<float>(test.cvt_s_d_in)); |
4095 CHECK_EQ(test.cvt_s_w_out, static_cast<float>(test.cvt_s_w_in)); | 4098 CHECK_EQ(test.cvt_s_w_out, static_cast<float>(test.cvt_s_w_in)); |
4096 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { | 4099 if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) && |
| 4100 IsFp64Mode()) { |
4097 CHECK_EQ(test.cvt_s_l_out, static_cast<float>(test.cvt_s_l_in)); | 4101 CHECK_EQ(test.cvt_s_l_out, static_cast<float>(test.cvt_s_l_in)); |
4098 } | 4102 } |
4099 CHECK_EQ(test.cvt_w_s_out, -1); | 4103 CHECK_EQ(test.cvt_w_s_out, -1); |
4100 CHECK_EQ(test.cvt_w_d_out, -1); | 4104 CHECK_EQ(test.cvt_w_d_out, -1); |
4101 | 4105 |
4102 | 4106 |
4103 test.cvt_d_s_in = 0.49; | 4107 test.cvt_d_s_in = 0.49; |
4104 test.cvt_d_w_in = 1; | 4108 test.cvt_d_w_in = 1; |
4105 test.cvt_d_l_in = 1; | 4109 test.cvt_d_l_in = 1; |
4106 test.cvt_l_s_in = 0.49; | 4110 test.cvt_l_s_in = 0.49; |
4107 test.cvt_l_d_in = 0.49; | 4111 test.cvt_l_d_in = 0.49; |
4108 test.cvt_s_d_in = 0.49; | 4112 test.cvt_s_d_in = 0.49; |
4109 test.cvt_s_w_in = 1; | 4113 test.cvt_s_w_in = 1; |
4110 test.cvt_s_l_in = 1; | 4114 test.cvt_s_l_in = 1; |
4111 test.cvt_w_s_in = 0.49; | 4115 test.cvt_w_s_in = 0.49; |
4112 test.cvt_w_d_in = 0.49; | 4116 test.cvt_w_d_in = 0.49; |
4113 | 4117 |
4114 (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0)); | 4118 (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0)); |
4115 CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in)); | 4119 CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in)); |
4116 CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in)); | 4120 CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in)); |
4117 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { | 4121 if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) && |
| 4122 IsFp64Mode()) { |
4118 CHECK_EQ(test.cvt_d_l_out, static_cast<double>(test.cvt_d_l_in)); | 4123 CHECK_EQ(test.cvt_d_l_out, static_cast<double>(test.cvt_d_l_in)); |
4119 } | 4124 } |
4120 if (IsFp64Mode()) { | 4125 if (IsFp64Mode()) { |
4121 CHECK_EQ(test.cvt_l_s_out, 0); | 4126 CHECK_EQ(test.cvt_l_s_out, 0); |
4122 CHECK_EQ(test.cvt_l_d_out, 0); | 4127 CHECK_EQ(test.cvt_l_d_out, 0); |
4123 } | 4128 } |
4124 CHECK_EQ(test.cvt_s_d_out, static_cast<float>(test.cvt_s_d_in)); | 4129 CHECK_EQ(test.cvt_s_d_out, static_cast<float>(test.cvt_s_d_in)); |
4125 CHECK_EQ(test.cvt_s_w_out, static_cast<float>(test.cvt_s_w_in)); | 4130 CHECK_EQ(test.cvt_s_w_out, static_cast<float>(test.cvt_s_w_in)); |
4126 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { | 4131 if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) && |
| 4132 IsFp64Mode()) { |
4127 CHECK_EQ(test.cvt_s_l_out, static_cast<float>(test.cvt_s_l_in)); | 4133 CHECK_EQ(test.cvt_s_l_out, static_cast<float>(test.cvt_s_l_in)); |
4128 } | 4134 } |
4129 CHECK_EQ(test.cvt_w_s_out, 0); | 4135 CHECK_EQ(test.cvt_w_s_out, 0); |
4130 CHECK_EQ(test.cvt_w_d_out, 0); | 4136 CHECK_EQ(test.cvt_w_d_out, 0); |
4131 | 4137 |
4132 test.cvt_d_s_in = std::numeric_limits<float>::max(); | 4138 test.cvt_d_s_in = std::numeric_limits<float>::max(); |
4133 test.cvt_d_w_in = std::numeric_limits<int32_t>::max(); | 4139 test.cvt_d_w_in = std::numeric_limits<int32_t>::max(); |
4134 test.cvt_d_l_in = std::numeric_limits<int64_t>::max(); | 4140 test.cvt_d_l_in = std::numeric_limits<int64_t>::max(); |
4135 test.cvt_l_s_in = std::numeric_limits<float>::max(); | 4141 test.cvt_l_s_in = std::numeric_limits<float>::max(); |
4136 test.cvt_l_d_in = std::numeric_limits<double>::max(); | 4142 test.cvt_l_d_in = std::numeric_limits<double>::max(); |
4137 test.cvt_s_d_in = std::numeric_limits<double>::max(); | 4143 test.cvt_s_d_in = std::numeric_limits<double>::max(); |
4138 test.cvt_s_w_in = std::numeric_limits<int32_t>::max(); | 4144 test.cvt_s_w_in = std::numeric_limits<int32_t>::max(); |
4139 test.cvt_s_l_in = std::numeric_limits<int64_t>::max(); | 4145 test.cvt_s_l_in = std::numeric_limits<int64_t>::max(); |
4140 test.cvt_w_s_in = std::numeric_limits<float>::max(); | 4146 test.cvt_w_s_in = std::numeric_limits<float>::max(); |
4141 test.cvt_w_d_in = std::numeric_limits<double>::max(); | 4147 test.cvt_w_d_in = std::numeric_limits<double>::max(); |
4142 | 4148 |
4143 (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0)); | 4149 (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0)); |
4144 CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in)); | 4150 CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in)); |
4145 CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in)); | 4151 CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in)); |
4146 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { | 4152 if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) && |
| 4153 IsFp64Mode()) { |
4147 CHECK_EQ(test.cvt_d_l_out, static_cast<double>(test.cvt_d_l_in)); | 4154 CHECK_EQ(test.cvt_d_l_out, static_cast<double>(test.cvt_d_l_in)); |
4148 } | 4155 } |
4149 if (IsFp64Mode()) { | 4156 if (IsFp64Mode()) { |
4150 CHECK_EQ(test.cvt_l_s_out, std::numeric_limits<int64_t>::max()); | 4157 CHECK_EQ(test.cvt_l_s_out, std::numeric_limits<int64_t>::max()); |
4151 CHECK_EQ(test.cvt_l_d_out, std::numeric_limits<int64_t>::max()); | 4158 CHECK_EQ(test.cvt_l_d_out, std::numeric_limits<int64_t>::max()); |
4152 } | 4159 } |
4153 CHECK_EQ(test.cvt_s_d_out, static_cast<float>(test.cvt_s_d_in)); | 4160 CHECK_EQ(test.cvt_s_d_out, static_cast<float>(test.cvt_s_d_in)); |
4154 CHECK_EQ(test.cvt_s_w_out, static_cast<float>(test.cvt_s_w_in)); | 4161 CHECK_EQ(test.cvt_s_w_out, static_cast<float>(test.cvt_s_w_in)); |
4155 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { | 4162 if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) && |
| 4163 IsFp64Mode()) { |
4156 CHECK_EQ(test.cvt_s_l_out, static_cast<float>(test.cvt_s_l_in)); | 4164 CHECK_EQ(test.cvt_s_l_out, static_cast<float>(test.cvt_s_l_in)); |
4157 } | 4165 } |
4158 CHECK_EQ(test.cvt_w_s_out, std::numeric_limits<int32_t>::max()); | 4166 CHECK_EQ(test.cvt_w_s_out, std::numeric_limits<int32_t>::max()); |
4159 CHECK_EQ(test.cvt_w_d_out, std::numeric_limits<int32_t>::max()); | 4167 CHECK_EQ(test.cvt_w_d_out, std::numeric_limits<int32_t>::max()); |
4160 | 4168 |
4161 | 4169 |
4162 test.cvt_d_s_in = -std::numeric_limits<float>::max(); // lowest() | 4170 test.cvt_d_s_in = -std::numeric_limits<float>::max(); // lowest() |
4163 test.cvt_d_w_in = std::numeric_limits<int32_t>::min(); // lowest() | 4171 test.cvt_d_w_in = std::numeric_limits<int32_t>::min(); // lowest() |
4164 test.cvt_d_l_in = std::numeric_limits<int64_t>::min(); // lowest() | 4172 test.cvt_d_l_in = std::numeric_limits<int64_t>::min(); // lowest() |
4165 test.cvt_l_s_in = -std::numeric_limits<float>::max(); // lowest() | 4173 test.cvt_l_s_in = -std::numeric_limits<float>::max(); // lowest() |
4166 test.cvt_l_d_in = -std::numeric_limits<double>::max(); // lowest() | 4174 test.cvt_l_d_in = -std::numeric_limits<double>::max(); // lowest() |
4167 test.cvt_s_d_in = -std::numeric_limits<double>::max(); // lowest() | 4175 test.cvt_s_d_in = -std::numeric_limits<double>::max(); // lowest() |
4168 test.cvt_s_w_in = std::numeric_limits<int32_t>::min(); // lowest() | 4176 test.cvt_s_w_in = std::numeric_limits<int32_t>::min(); // lowest() |
4169 test.cvt_s_l_in = std::numeric_limits<int64_t>::min(); // lowest() | 4177 test.cvt_s_l_in = std::numeric_limits<int64_t>::min(); // lowest() |
4170 test.cvt_w_s_in = -std::numeric_limits<float>::max(); // lowest() | 4178 test.cvt_w_s_in = -std::numeric_limits<float>::max(); // lowest() |
4171 test.cvt_w_d_in = -std::numeric_limits<double>::max(); // lowest() | 4179 test.cvt_w_d_in = -std::numeric_limits<double>::max(); // lowest() |
4172 | 4180 |
4173 (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0)); | 4181 (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0)); |
4174 CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in)); | 4182 CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in)); |
4175 CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in)); | 4183 CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in)); |
4176 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { | 4184 if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) && |
| 4185 IsFp64Mode()) { |
4177 CHECK_EQ(test.cvt_d_l_out, static_cast<double>(test.cvt_d_l_in)); | 4186 CHECK_EQ(test.cvt_d_l_out, static_cast<double>(test.cvt_d_l_in)); |
4178 } | 4187 } |
4179 // The returned value when converting from fixed-point to float-point | 4188 // The returned value when converting from fixed-point to float-point |
4180 // is not consistent between board, simulator and specification | 4189 // is not consistent between board, simulator and specification |
4181 // in this test case, therefore modifying the test | 4190 // in this test case, therefore modifying the test |
4182 if (IsFp64Mode()) { | 4191 if (IsFp64Mode()) { |
4183 CHECK(test.cvt_l_s_out == std::numeric_limits<int64_t>::min() || | 4192 CHECK(test.cvt_l_s_out == std::numeric_limits<int64_t>::min() || |
4184 test.cvt_l_s_out == std::numeric_limits<int64_t>::max()); | 4193 test.cvt_l_s_out == std::numeric_limits<int64_t>::max()); |
4185 CHECK(test.cvt_l_d_out == std::numeric_limits<int64_t>::min() || | 4194 CHECK(test.cvt_l_d_out == std::numeric_limits<int64_t>::min() || |
4186 test.cvt_l_d_out == std::numeric_limits<int64_t>::max()); | 4195 test.cvt_l_d_out == std::numeric_limits<int64_t>::max()); |
4187 } | 4196 } |
4188 CHECK_EQ(test.cvt_s_d_out, static_cast<float>(test.cvt_s_d_in)); | 4197 CHECK_EQ(test.cvt_s_d_out, static_cast<float>(test.cvt_s_d_in)); |
4189 CHECK_EQ(test.cvt_s_w_out, static_cast<float>(test.cvt_s_w_in)); | 4198 CHECK_EQ(test.cvt_s_w_out, static_cast<float>(test.cvt_s_w_in)); |
4190 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { | 4199 if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) && |
| 4200 IsFp64Mode()) { |
4191 CHECK_EQ(test.cvt_s_l_out, static_cast<float>(test.cvt_s_l_in)); | 4201 CHECK_EQ(test.cvt_s_l_out, static_cast<float>(test.cvt_s_l_in)); |
4192 } | 4202 } |
4193 CHECK(test.cvt_w_s_out == std::numeric_limits<int32_t>::min() || | 4203 CHECK(test.cvt_w_s_out == std::numeric_limits<int32_t>::min() || |
4194 test.cvt_w_s_out == std::numeric_limits<int32_t>::max()); | 4204 test.cvt_w_s_out == std::numeric_limits<int32_t>::max()); |
4195 CHECK(test.cvt_w_d_out == std::numeric_limits<int32_t>::min() || | 4205 CHECK(test.cvt_w_d_out == std::numeric_limits<int32_t>::min() || |
4196 test.cvt_w_d_out == std::numeric_limits<int32_t>::max()); | 4206 test.cvt_w_d_out == std::numeric_limits<int32_t>::max()); |
4197 | 4207 |
4198 | 4208 |
4199 test.cvt_d_s_in = std::numeric_limits<float>::min(); | 4209 test.cvt_d_s_in = std::numeric_limits<float>::min(); |
4200 test.cvt_d_w_in = std::numeric_limits<int32_t>::min(); | 4210 test.cvt_d_w_in = std::numeric_limits<int32_t>::min(); |
4201 test.cvt_d_l_in = std::numeric_limits<int64_t>::min(); | 4211 test.cvt_d_l_in = std::numeric_limits<int64_t>::min(); |
4202 test.cvt_l_s_in = std::numeric_limits<float>::min(); | 4212 test.cvt_l_s_in = std::numeric_limits<float>::min(); |
4203 test.cvt_l_d_in = std::numeric_limits<double>::min(); | 4213 test.cvt_l_d_in = std::numeric_limits<double>::min(); |
4204 test.cvt_s_d_in = std::numeric_limits<double>::min(); | 4214 test.cvt_s_d_in = std::numeric_limits<double>::min(); |
4205 test.cvt_s_w_in = std::numeric_limits<int32_t>::min(); | 4215 test.cvt_s_w_in = std::numeric_limits<int32_t>::min(); |
4206 test.cvt_s_l_in = std::numeric_limits<int64_t>::min(); | 4216 test.cvt_s_l_in = std::numeric_limits<int64_t>::min(); |
4207 test.cvt_w_s_in = std::numeric_limits<float>::min(); | 4217 test.cvt_w_s_in = std::numeric_limits<float>::min(); |
4208 test.cvt_w_d_in = std::numeric_limits<double>::min(); | 4218 test.cvt_w_d_in = std::numeric_limits<double>::min(); |
4209 | 4219 |
4210 (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0)); | 4220 (CALL_GENERATED_CODE(f, &test, 0, 0, 0, 0)); |
4211 CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in)); | 4221 CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in)); |
4212 CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in)); | 4222 CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in)); |
4213 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { | 4223 if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) && |
| 4224 IsFp64Mode()) { |
4214 CHECK_EQ(test.cvt_d_l_out, static_cast<double>(test.cvt_d_l_in)); | 4225 CHECK_EQ(test.cvt_d_l_out, static_cast<double>(test.cvt_d_l_in)); |
4215 } | 4226 } |
4216 if (IsFp64Mode()) { | 4227 if (IsFp64Mode()) { |
4217 CHECK_EQ(test.cvt_l_s_out, 0); | 4228 CHECK_EQ(test.cvt_l_s_out, 0); |
4218 CHECK_EQ(test.cvt_l_d_out, 0); | 4229 CHECK_EQ(test.cvt_l_d_out, 0); |
4219 } | 4230 } |
4220 CHECK_EQ(test.cvt_s_d_out, static_cast<float>(test.cvt_s_d_in)); | 4231 CHECK_EQ(test.cvt_s_d_out, static_cast<float>(test.cvt_s_d_in)); |
4221 CHECK_EQ(test.cvt_s_w_out, static_cast<float>(test.cvt_s_w_in)); | 4232 CHECK_EQ(test.cvt_s_w_out, static_cast<float>(test.cvt_s_w_in)); |
4222 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { | 4233 if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) && |
| 4234 IsFp64Mode()) { |
4223 CHECK_EQ(test.cvt_s_l_out, static_cast<float>(test.cvt_s_l_in)); | 4235 CHECK_EQ(test.cvt_s_l_out, static_cast<float>(test.cvt_s_l_in)); |
4224 } | 4236 } |
4225 CHECK_EQ(test.cvt_w_s_out, 0); | 4237 CHECK_EQ(test.cvt_w_s_out, 0); |
4226 CHECK_EQ(test.cvt_w_d_out, 0); | 4238 CHECK_EQ(test.cvt_w_d_out, 0); |
4227 } | 4239 } |
4228 | 4240 |
4229 | 4241 |
4230 TEST(DIV_FMT) { | 4242 TEST(DIV_FMT) { |
4231 CcTest::InitializeVM(); | 4243 CcTest::InitializeVM(); |
4232 Isolate* isolate = CcTest::i_isolate(); | 4244 Isolate* isolate = CcTest::i_isolate(); |
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5127 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); | 5139 desc, Code::ComputeFlags(Code::STUB), Handle<Code>()); |
5128 F2 f = FUNCTION_CAST<F2>(code->entry()); | 5140 F2 f = FUNCTION_CAST<F2>(code->entry()); |
5129 | 5141 |
5130 int32_t res = | 5142 int32_t res = |
5131 reinterpret_cast<int32_t>(CALL_GENERATED_CODE(f, 42, 42, 0, 0, 0)); | 5143 reinterpret_cast<int32_t>(CALL_GENERATED_CODE(f, 42, 42, 0, 0, 0)); |
5132 CHECK_EQ(res, 0); | 5144 CHECK_EQ(res, 0); |
5133 } | 5145 } |
5134 | 5146 |
5135 | 5147 |
5136 #undef __ | 5148 #undef __ |
OLD | NEW |