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

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

Issue 170783002: A64: Introduce 'branch types' that extend the architectural conditions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: inline InvertBranchType Created 6 years, 10 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/a64/macro-assembler-a64.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 2258 matching lines...) Expand 10 before | Expand all | Expand 10 after
2269 2269
2270 RUN(); 2270 RUN();
2271 2271
2272 ASSERT_EQUAL_64(0x3, x0); 2272 ASSERT_EQUAL_64(0x3, x0);
2273 ASSERT_EQUAL_64(0x1, x1); 2273 ASSERT_EQUAL_64(0x1, x1);
2274 2274
2275 TEARDOWN(); 2275 TEARDOWN();
2276 } 2276 }
2277 2277
2278 2278
2279 TEST(branch_type) {
2280 INIT_V8();
2281
2282 SETUP();
2283
2284 Label fail, done;
2285
2286 START();
2287 __ Mov(x0, 0x0);
2288 __ Mov(x10, 0x7);
2289 __ Mov(x11, 0x0);
2290
2291 // Test non taken branches.
2292 __ Cmp(x10, 0x7);
2293 __ B(&fail, ne);
2294 __ B(&fail, never);
2295 __ B(&fail, reg_zero, x10);
2296 __ B(&fail, reg_not_zero, x11);
2297 __ B(&fail, reg_bit_clear, x10, 0);
2298 __ B(&fail, reg_bit_set, x10, 3);
2299
2300 // Test taken branches.
2301 Label l1, l2, l3, l4, l5;
2302 __ Cmp(x10, 0x7);
2303 __ B(&l1, eq);
2304 __ B(&fail);
2305 __ Bind(&l1);
2306 __ B(&l2, always);
2307 __ B(&fail);
2308 __ Bind(&l2);
2309 __ B(&l3, reg_not_zero, x10);
2310 __ B(&fail);
2311 __ Bind(&l3);
2312 __ B(&l4, reg_bit_clear, x10, 15);
2313 __ B(&fail);
2314 __ Bind(&l4);
2315 __ B(&l5, reg_bit_set, x10, 1);
2316 __ B(&fail);
2317 __ Bind(&l5);
2318
2319 __ B(&done);
2320
2321 __ Bind(&fail);
2322 __ Mov(x0, 0x1);
2323
2324 __ Bind(&done);
2325
2326 END();
2327
2328 RUN();
2329
2330 ASSERT_EQUAL_64(0x0, x0);
2331
2332 TEARDOWN();
2333 }
2334
2335
2279 TEST(ldr_str_offset) { 2336 TEST(ldr_str_offset) {
2280 INIT_V8(); 2337 INIT_V8();
2281 SETUP(); 2338 SETUP();
2282 2339
2283 uint64_t src[2] = {0xfedcba9876543210UL, 0x0123456789abcdefUL}; 2340 uint64_t src[2] = {0xfedcba9876543210UL, 0x0123456789abcdefUL};
2284 uint64_t dst[5] = {0, 0, 0, 0, 0}; 2341 uint64_t dst[5] = {0, 0, 0, 0, 0};
2285 uintptr_t src_base = reinterpret_cast<uintptr_t>(src); 2342 uintptr_t src_base = reinterpret_cast<uintptr_t>(src);
2286 uintptr_t dst_base = reinterpret_cast<uintptr_t>(dst); 2343 uintptr_t dst_base = reinterpret_cast<uintptr_t>(dst);
2287 2344
2288 START(); 2345 START();
(...skipping 7668 matching lines...) Expand 10 before | Expand all | Expand 10 after
9957 AbsHelperX(-42); 10014 AbsHelperX(-42);
9958 AbsHelperX(kXMinInt); 10015 AbsHelperX(kXMinInt);
9959 AbsHelperX(kXMaxInt); 10016 AbsHelperX(kXMaxInt);
9960 10017
9961 AbsHelperW(0); 10018 AbsHelperW(0);
9962 AbsHelperW(42); 10019 AbsHelperW(42);
9963 AbsHelperW(-42); 10020 AbsHelperW(-42);
9964 AbsHelperW(kWMinInt); 10021 AbsHelperW(kWMinInt);
9965 AbsHelperW(kWMaxInt); 10022 AbsHelperW(kWMaxInt);
9966 } 10023 }
OLDNEW
« no previous file with comments | « src/a64/macro-assembler-a64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698