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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/a64/macro-assembler-a64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-assembler-a64.cc
diff --git a/test/cctest/test-assembler-a64.cc b/test/cctest/test-assembler-a64.cc
index 376672165038a52e05f83fbd7644004c64598833..cb5a0b22474e16967524c979e4224d50449d3027 100644
--- a/test/cctest/test-assembler-a64.cc
+++ b/test/cctest/test-assembler-a64.cc
@@ -2276,6 +2276,63 @@ TEST(far_branch_veneer_broken_link_chain) {
}
+TEST(branch_type) {
+ INIT_V8();
+
+ SETUP();
+
+ Label fail, done;
+
+ START();
+ __ Mov(x0, 0x0);
+ __ Mov(x10, 0x7);
+ __ Mov(x11, 0x0);
+
+ // Test non taken branches.
+ __ Cmp(x10, 0x7);
+ __ B(&fail, ne);
+ __ B(&fail, never);
+ __ B(&fail, reg_zero, x10);
+ __ B(&fail, reg_not_zero, x11);
+ __ B(&fail, reg_bit_clear, x10, 0);
+ __ B(&fail, reg_bit_set, x10, 3);
+
+ // Test taken branches.
+ Label l1, l2, l3, l4, l5;
+ __ Cmp(x10, 0x7);
+ __ B(&l1, eq);
+ __ B(&fail);
+ __ Bind(&l1);
+ __ B(&l2, always);
+ __ B(&fail);
+ __ Bind(&l2);
+ __ B(&l3, reg_not_zero, x10);
+ __ B(&fail);
+ __ Bind(&l3);
+ __ B(&l4, reg_bit_clear, x10, 15);
+ __ B(&fail);
+ __ Bind(&l4);
+ __ B(&l5, reg_bit_set, x10, 1);
+ __ B(&fail);
+ __ Bind(&l5);
+
+ __ B(&done);
+
+ __ Bind(&fail);
+ __ Mov(x0, 0x1);
+
+ __ Bind(&done);
+
+ END();
+
+ RUN();
+
+ ASSERT_EQUAL_64(0x0, x0);
+
+ TEARDOWN();
+}
+
+
TEST(ldr_str_offset) {
INIT_V8();
SETUP();
« 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