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

Side by Side Diff: test/cctest/test-assembler-arm64.cc

Issue 223843002: ARM64: Fixes and more support for FRINT<X> instructions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « src/arm64/simulator-arm64.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 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 6014 matching lines...) Expand 10 before | Expand all | Expand 10 after
6025 __ Fmov(s17, 1.1); 6025 __ Fmov(s17, 1.1);
6026 __ Fmov(s18, 1.5); 6026 __ Fmov(s18, 1.5);
6027 __ Fmov(s19, 1.9); 6027 __ Fmov(s19, 1.9);
6028 __ Fmov(s20, 2.5); 6028 __ Fmov(s20, 2.5);
6029 __ Fmov(s21, -1.5); 6029 __ Fmov(s21, -1.5);
6030 __ Fmov(s22, -2.5); 6030 __ Fmov(s22, -2.5);
6031 __ Fmov(s23, kFP32PositiveInfinity); 6031 __ Fmov(s23, kFP32PositiveInfinity);
6032 __ Fmov(s24, kFP32NegativeInfinity); 6032 __ Fmov(s24, kFP32NegativeInfinity);
6033 __ Fmov(s25, 0.0); 6033 __ Fmov(s25, 0.0);
6034 __ Fmov(s26, -0.0); 6034 __ Fmov(s26, -0.0);
6035 __ Fmov(s27, -0.2);
6035 6036
6036 __ Frinta(s0, s16); 6037 __ Frinta(s0, s16);
6037 __ Frinta(s1, s17); 6038 __ Frinta(s1, s17);
6038 __ Frinta(s2, s18); 6039 __ Frinta(s2, s18);
6039 __ Frinta(s3, s19); 6040 __ Frinta(s3, s19);
6040 __ Frinta(s4, s20); 6041 __ Frinta(s4, s20);
6041 __ Frinta(s5, s21); 6042 __ Frinta(s5, s21);
6042 __ Frinta(s6, s22); 6043 __ Frinta(s6, s22);
6043 __ Frinta(s7, s23); 6044 __ Frinta(s7, s23);
6044 __ Frinta(s8, s24); 6045 __ Frinta(s8, s24);
6045 __ Frinta(s9, s25); 6046 __ Frinta(s9, s25);
6046 __ Frinta(s10, s26); 6047 __ Frinta(s10, s26);
6048 __ Frinta(s11, s27);
6047 6049
6048 __ Fmov(d16, 1.0); 6050 __ Fmov(d16, 1.0);
6049 __ Fmov(d17, 1.1); 6051 __ Fmov(d17, 1.1);
6050 __ Fmov(d18, 1.5); 6052 __ Fmov(d18, 1.5);
6051 __ Fmov(d19, 1.9); 6053 __ Fmov(d19, 1.9);
6052 __ Fmov(d20, 2.5); 6054 __ Fmov(d20, 2.5);
6053 __ Fmov(d21, -1.5); 6055 __ Fmov(d21, -1.5);
6054 __ Fmov(d22, -2.5); 6056 __ Fmov(d22, -2.5);
6055 __ Fmov(d23, kFP32PositiveInfinity); 6057 __ Fmov(d23, kFP32PositiveInfinity);
6056 __ Fmov(d24, kFP32NegativeInfinity); 6058 __ Fmov(d24, kFP32NegativeInfinity);
6057 __ Fmov(d25, 0.0); 6059 __ Fmov(d25, 0.0);
6058 __ Fmov(d26, -0.0); 6060 __ Fmov(d26, -0.0);
6061 __ Fmov(d27, -0.2);
6059 6062
6060 __ Frinta(d11, d16); 6063 __ Frinta(d12, d16);
6061 __ Frinta(d12, d17); 6064 __ Frinta(d13, d17);
6062 __ Frinta(d13, d18); 6065 __ Frinta(d14, d18);
6063 __ Frinta(d14, d19); 6066 __ Frinta(d15, d19);
6064 __ Frinta(d15, d20); 6067 __ Frinta(d16, d20);
6065 __ Frinta(d16, d21); 6068 __ Frinta(d17, d21);
6066 __ Frinta(d17, d22); 6069 __ Frinta(d18, d22);
6067 __ Frinta(d18, d23); 6070 __ Frinta(d19, d23);
6068 __ Frinta(d19, d24); 6071 __ Frinta(d20, d24);
6069 __ Frinta(d20, d25); 6072 __ Frinta(d21, d25);
6070 __ Frinta(d21, d26); 6073 __ Frinta(d22, d26);
6074 __ Frinta(d23, d27);
6071 END(); 6075 END();
6072 6076
6073 RUN(); 6077 RUN();
6074 6078
6075 ASSERT_EQUAL_FP32(1.0, s0); 6079 ASSERT_EQUAL_FP32(1.0, s0);
6076 ASSERT_EQUAL_FP32(1.0, s1); 6080 ASSERT_EQUAL_FP32(1.0, s1);
6077 ASSERT_EQUAL_FP32(2.0, s2); 6081 ASSERT_EQUAL_FP32(2.0, s2);
6078 ASSERT_EQUAL_FP32(2.0, s3); 6082 ASSERT_EQUAL_FP32(2.0, s3);
6079 ASSERT_EQUAL_FP32(3.0, s4); 6083 ASSERT_EQUAL_FP32(3.0, s4);
6080 ASSERT_EQUAL_FP32(-2.0, s5); 6084 ASSERT_EQUAL_FP32(-2.0, s5);
6081 ASSERT_EQUAL_FP32(-3.0, s6); 6085 ASSERT_EQUAL_FP32(-3.0, s6);
6082 ASSERT_EQUAL_FP32(kFP32PositiveInfinity, s7); 6086 ASSERT_EQUAL_FP32(kFP32PositiveInfinity, s7);
6083 ASSERT_EQUAL_FP32(kFP32NegativeInfinity, s8); 6087 ASSERT_EQUAL_FP32(kFP32NegativeInfinity, s8);
6084 ASSERT_EQUAL_FP32(0.0, s9); 6088 ASSERT_EQUAL_FP32(0.0, s9);
6085 ASSERT_EQUAL_FP32(-0.0, s10); 6089 ASSERT_EQUAL_FP32(-0.0, s10);
6086 ASSERT_EQUAL_FP64(1.0, d11); 6090 ASSERT_EQUAL_FP32(-0.0, s11);
6087 ASSERT_EQUAL_FP64(1.0, d12); 6091 ASSERT_EQUAL_FP64(1.0, d12);
6088 ASSERT_EQUAL_FP64(2.0, d13); 6092 ASSERT_EQUAL_FP64(1.0, d13);
6089 ASSERT_EQUAL_FP64(2.0, d14); 6093 ASSERT_EQUAL_FP64(2.0, d14);
6090 ASSERT_EQUAL_FP64(3.0, d15); 6094 ASSERT_EQUAL_FP64(2.0, d15);
6091 ASSERT_EQUAL_FP64(-2.0, d16); 6095 ASSERT_EQUAL_FP64(3.0, d16);
6092 ASSERT_EQUAL_FP64(-3.0, d17); 6096 ASSERT_EQUAL_FP64(-2.0, d17);
6093 ASSERT_EQUAL_FP64(kFP64PositiveInfinity, d18); 6097 ASSERT_EQUAL_FP64(-3.0, d18);
6094 ASSERT_EQUAL_FP64(kFP64NegativeInfinity, d19); 6098 ASSERT_EQUAL_FP64(kFP64PositiveInfinity, d19);
6095 ASSERT_EQUAL_FP64(0.0, d20); 6099 ASSERT_EQUAL_FP64(kFP64NegativeInfinity, d20);
6096 ASSERT_EQUAL_FP64(-0.0, d21); 6100 ASSERT_EQUAL_FP64(0.0, d21);
6101 ASSERT_EQUAL_FP64(-0.0, d22);
6102 ASSERT_EQUAL_FP64(-0.0, d23);
6097 6103
6098 TEARDOWN(); 6104 TEARDOWN();
6099 } 6105 }
6106
6107
6108 TEST(frintm) {
6109 INIT_V8();
6110 SETUP();
6111
6112 START();
6113 __ Fmov(s16, 1.0);
6114 __ Fmov(s17, 1.1);
6115 __ Fmov(s18, 1.5);
6116 __ Fmov(s19, 1.9);
6117 __ Fmov(s20, 2.5);
6118 __ Fmov(s21, -1.5);
6119 __ Fmov(s22, -2.5);
6120 __ Fmov(s23, kFP32PositiveInfinity);
6121 __ Fmov(s24, kFP32NegativeInfinity);
6122 __ Fmov(s25, 0.0);
6123 __ Fmov(s26, -0.0);
6124 __ Fmov(s27, -0.2);
6125
6126 __ Frintm(s0, s16);
6127 __ Frintm(s1, s17);
6128 __ Frintm(s2, s18);
6129 __ Frintm(s3, s19);
6130 __ Frintm(s4, s20);
6131 __ Frintm(s5, s21);
6132 __ Frintm(s6, s22);
6133 __ Frintm(s7, s23);
6134 __ Frintm(s8, s24);
6135 __ Frintm(s9, s25);
6136 __ Frintm(s10, s26);
6137 __ Frintm(s11, s27);
6138
6139 __ Fmov(d16, 1.0);
6140 __ Fmov(d17, 1.1);
6141 __ Fmov(d18, 1.5);
6142 __ Fmov(d19, 1.9);
6143 __ Fmov(d20, 2.5);
6144 __ Fmov(d21, -1.5);
6145 __ Fmov(d22, -2.5);
6146 __ Fmov(d23, kFP32PositiveInfinity);
6147 __ Fmov(d24, kFP32NegativeInfinity);
6148 __ Fmov(d25, 0.0);
6149 __ Fmov(d26, -0.0);
6150 __ Fmov(d27, -0.2);
6151
6152 __ Frintm(d12, d16);
6153 __ Frintm(d13, d17);
6154 __ Frintm(d14, d18);
6155 __ Frintm(d15, d19);
6156 __ Frintm(d16, d20);
6157 __ Frintm(d17, d21);
6158 __ Frintm(d18, d22);
6159 __ Frintm(d19, d23);
6160 __ Frintm(d20, d24);
6161 __ Frintm(d21, d25);
6162 __ Frintm(d22, d26);
6163 __ Frintm(d23, d27);
6164 END();
6165
6166 RUN();
6167
6168 ASSERT_EQUAL_FP32(1.0, s0);
6169 ASSERT_EQUAL_FP32(1.0, s1);
6170 ASSERT_EQUAL_FP32(1.0, s2);
6171 ASSERT_EQUAL_FP32(1.0, s3);
6172 ASSERT_EQUAL_FP32(2.0, s4);
6173 ASSERT_EQUAL_FP32(-2.0, s5);
6174 ASSERT_EQUAL_FP32(-3.0, s6);
6175 ASSERT_EQUAL_FP32(kFP32PositiveInfinity, s7);
6176 ASSERT_EQUAL_FP32(kFP32NegativeInfinity, s8);
6177 ASSERT_EQUAL_FP32(0.0, s9);
6178 ASSERT_EQUAL_FP32(-0.0, s10);
6179 ASSERT_EQUAL_FP32(-1.0, s11);
6180 ASSERT_EQUAL_FP64(1.0, d12);
6181 ASSERT_EQUAL_FP64(1.0, d13);
6182 ASSERT_EQUAL_FP64(1.0, d14);
6183 ASSERT_EQUAL_FP64(1.0, d15);
6184 ASSERT_EQUAL_FP64(2.0, d16);
6185 ASSERT_EQUAL_FP64(-2.0, d17);
6186 ASSERT_EQUAL_FP64(-3.0, d18);
6187 ASSERT_EQUAL_FP64(kFP64PositiveInfinity, d19);
6188 ASSERT_EQUAL_FP64(kFP64NegativeInfinity, d20);
6189 ASSERT_EQUAL_FP64(0.0, d21);
6190 ASSERT_EQUAL_FP64(-0.0, d22);
6191 ASSERT_EQUAL_FP64(-1.0, d23);
6192
6193 TEARDOWN();
6194 }
6100 6195
6101 6196
6102 TEST(frintn) { 6197 TEST(frintn) {
6103 INIT_V8(); 6198 INIT_V8();
6104 SETUP(); 6199 SETUP();
6105 6200
6106 START(); 6201 START();
6107 __ Fmov(s16, 1.0); 6202 __ Fmov(s16, 1.0);
6108 __ Fmov(s17, 1.1); 6203 __ Fmov(s17, 1.1);
6109 __ Fmov(s18, 1.5); 6204 __ Fmov(s18, 1.5);
6110 __ Fmov(s19, 1.9); 6205 __ Fmov(s19, 1.9);
6111 __ Fmov(s20, 2.5); 6206 __ Fmov(s20, 2.5);
6112 __ Fmov(s21, -1.5); 6207 __ Fmov(s21, -1.5);
6113 __ Fmov(s22, -2.5); 6208 __ Fmov(s22, -2.5);
6114 __ Fmov(s23, kFP32PositiveInfinity); 6209 __ Fmov(s23, kFP32PositiveInfinity);
6115 __ Fmov(s24, kFP32NegativeInfinity); 6210 __ Fmov(s24, kFP32NegativeInfinity);
6116 __ Fmov(s25, 0.0); 6211 __ Fmov(s25, 0.0);
6117 __ Fmov(s26, -0.0); 6212 __ Fmov(s26, -0.0);
6213 __ Fmov(s27, -0.2);
6118 6214
6119 __ Frintn(s0, s16); 6215 __ Frintn(s0, s16);
6120 __ Frintn(s1, s17); 6216 __ Frintn(s1, s17);
6121 __ Frintn(s2, s18); 6217 __ Frintn(s2, s18);
6122 __ Frintn(s3, s19); 6218 __ Frintn(s3, s19);
6123 __ Frintn(s4, s20); 6219 __ Frintn(s4, s20);
6124 __ Frintn(s5, s21); 6220 __ Frintn(s5, s21);
6125 __ Frintn(s6, s22); 6221 __ Frintn(s6, s22);
6126 __ Frintn(s7, s23); 6222 __ Frintn(s7, s23);
6127 __ Frintn(s8, s24); 6223 __ Frintn(s8, s24);
6128 __ Frintn(s9, s25); 6224 __ Frintn(s9, s25);
6129 __ Frintn(s10, s26); 6225 __ Frintn(s10, s26);
6226 __ Frintn(s11, s27);
6130 6227
6131 __ Fmov(d16, 1.0); 6228 __ Fmov(d16, 1.0);
6132 __ Fmov(d17, 1.1); 6229 __ Fmov(d17, 1.1);
6133 __ Fmov(d18, 1.5); 6230 __ Fmov(d18, 1.5);
6134 __ Fmov(d19, 1.9); 6231 __ Fmov(d19, 1.9);
6135 __ Fmov(d20, 2.5); 6232 __ Fmov(d20, 2.5);
6136 __ Fmov(d21, -1.5); 6233 __ Fmov(d21, -1.5);
6137 __ Fmov(d22, -2.5); 6234 __ Fmov(d22, -2.5);
6138 __ Fmov(d23, kFP32PositiveInfinity); 6235 __ Fmov(d23, kFP32PositiveInfinity);
6139 __ Fmov(d24, kFP32NegativeInfinity); 6236 __ Fmov(d24, kFP32NegativeInfinity);
6140 __ Fmov(d25, 0.0); 6237 __ Fmov(d25, 0.0);
6141 __ Fmov(d26, -0.0); 6238 __ Fmov(d26, -0.0);
6239 __ Fmov(d27, -0.2);
6142 6240
6143 __ Frintn(d11, d16); 6241 __ Frintn(d12, d16);
6144 __ Frintn(d12, d17); 6242 __ Frintn(d13, d17);
6145 __ Frintn(d13, d18); 6243 __ Frintn(d14, d18);
6146 __ Frintn(d14, d19); 6244 __ Frintn(d15, d19);
6147 __ Frintn(d15, d20); 6245 __ Frintn(d16, d20);
6148 __ Frintn(d16, d21); 6246 __ Frintn(d17, d21);
6149 __ Frintn(d17, d22); 6247 __ Frintn(d18, d22);
6150 __ Frintn(d18, d23); 6248 __ Frintn(d19, d23);
6151 __ Frintn(d19, d24); 6249 __ Frintn(d20, d24);
6152 __ Frintn(d20, d25); 6250 __ Frintn(d21, d25);
6153 __ Frintn(d21, d26); 6251 __ Frintn(d22, d26);
6252 __ Frintn(d23, d27);
6154 END(); 6253 END();
6155 6254
6156 RUN(); 6255 RUN();
6157 6256
6158 ASSERT_EQUAL_FP32(1.0, s0); 6257 ASSERT_EQUAL_FP32(1.0, s0);
6159 ASSERT_EQUAL_FP32(1.0, s1); 6258 ASSERT_EQUAL_FP32(1.0, s1);
6160 ASSERT_EQUAL_FP32(2.0, s2); 6259 ASSERT_EQUAL_FP32(2.0, s2);
6161 ASSERT_EQUAL_FP32(2.0, s3); 6260 ASSERT_EQUAL_FP32(2.0, s3);
6162 ASSERT_EQUAL_FP32(2.0, s4); 6261 ASSERT_EQUAL_FP32(2.0, s4);
6163 ASSERT_EQUAL_FP32(-2.0, s5); 6262 ASSERT_EQUAL_FP32(-2.0, s5);
6164 ASSERT_EQUAL_FP32(-2.0, s6); 6263 ASSERT_EQUAL_FP32(-2.0, s6);
6165 ASSERT_EQUAL_FP32(kFP32PositiveInfinity, s7); 6264 ASSERT_EQUAL_FP32(kFP32PositiveInfinity, s7);
6166 ASSERT_EQUAL_FP32(kFP32NegativeInfinity, s8); 6265 ASSERT_EQUAL_FP32(kFP32NegativeInfinity, s8);
6167 ASSERT_EQUAL_FP32(0.0, s9); 6266 ASSERT_EQUAL_FP32(0.0, s9);
6168 ASSERT_EQUAL_FP32(-0.0, s10); 6267 ASSERT_EQUAL_FP32(-0.0, s10);
6169 ASSERT_EQUAL_FP64(1.0, d11); 6268 ASSERT_EQUAL_FP32(-0.0, s11);
6170 ASSERT_EQUAL_FP64(1.0, d12); 6269 ASSERT_EQUAL_FP64(1.0, d12);
6171 ASSERT_EQUAL_FP64(2.0, d13); 6270 ASSERT_EQUAL_FP64(1.0, d13);
6172 ASSERT_EQUAL_FP64(2.0, d14); 6271 ASSERT_EQUAL_FP64(2.0, d14);
6173 ASSERT_EQUAL_FP64(2.0, d15); 6272 ASSERT_EQUAL_FP64(2.0, d15);
6174 ASSERT_EQUAL_FP64(-2.0, d16); 6273 ASSERT_EQUAL_FP64(2.0, d16);
6175 ASSERT_EQUAL_FP64(-2.0, d17); 6274 ASSERT_EQUAL_FP64(-2.0, d17);
6176 ASSERT_EQUAL_FP64(kFP64PositiveInfinity, d18); 6275 ASSERT_EQUAL_FP64(-2.0, d18);
6177 ASSERT_EQUAL_FP64(kFP64NegativeInfinity, d19); 6276 ASSERT_EQUAL_FP64(kFP64PositiveInfinity, d19);
6178 ASSERT_EQUAL_FP64(0.0, d20); 6277 ASSERT_EQUAL_FP64(kFP64NegativeInfinity, d20);
6179 ASSERT_EQUAL_FP64(-0.0, d21); 6278 ASSERT_EQUAL_FP64(0.0, d21);
6279 ASSERT_EQUAL_FP64(-0.0, d22);
6280 ASSERT_EQUAL_FP64(-0.0, d23);
6180 6281
6181 TEARDOWN(); 6282 TEARDOWN();
6182 } 6283 }
6183 6284
6184 6285
6185 TEST(frintz) { 6286 TEST(frintz) {
6186 INIT_V8(); 6287 INIT_V8();
6187 SETUP(); 6288 SETUP();
6188 6289
6189 START(); 6290 START();
(...skipping 4602 matching lines...) Expand 10 before | Expand all | Expand 10 after
10792 if (RelocInfo::IsVeneerPool(info->rmode())) { 10893 if (RelocInfo::IsVeneerPool(info->rmode())) {
10793 ASSERT(info->data() == veneer_pool_size); 10894 ASSERT(info->data() == veneer_pool_size);
10794 ++pool_count; 10895 ++pool_count;
10795 } 10896 }
10796 } 10897 }
10797 10898
10798 ASSERT(pool_count == 2); 10899 ASSERT(pool_count == 2);
10799 10900
10800 TEARDOWN(); 10901 TEARDOWN();
10801 } 10902 }
OLDNEW
« no previous file with comments | « src/arm64/simulator-arm64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698