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

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

Issue 207823003: Rename A64 port to ARM64 port (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: retry Created 6 years, 9 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 | « test/cctest/test-assembler-a64.cc ('k') | test/cctest/test-code-stubs-a64.cc » ('j') | 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 16 matching lines...) Expand all
27 27
28 #include <stdio.h> 28 #include <stdio.h>
29 #include <stdlib.h> 29 #include <stdlib.h>
30 #include <string.h> 30 #include <string.h>
31 #include <cmath> 31 #include <cmath>
32 #include <limits> 32 #include <limits>
33 33
34 #include "v8.h" 34 #include "v8.h"
35 35
36 #include "macro-assembler.h" 36 #include "macro-assembler.h"
37 #include "a64/simulator-a64.h" 37 #include "arm64/simulator-arm64.h"
38 #include "a64/decoder-a64-inl.h" 38 #include "arm64/decoder-arm64-inl.h"
39 #include "a64/disasm-a64.h" 39 #include "arm64/disasm-arm64.h"
40 #include "a64/utils-a64.h" 40 #include "arm64/utils-arm64.h"
41 #include "cctest.h" 41 #include "cctest.h"
42 #include "test-utils-a64.h" 42 #include "test-utils-arm64.h"
43 43
44 using namespace v8::internal; 44 using namespace v8::internal;
45 45
46 // Test infrastructure. 46 // Test infrastructure.
47 // 47 //
48 // Tests are functions which accept no parameters and have no return values. 48 // Tests are functions which accept no parameters and have no return values.
49 // The testing code should not perform an explicit return once completed. For 49 // The testing code should not perform an explicit return once completed. For
50 // example to test the mov immediate instruction a very simple test would be: 50 // example to test the mov immediate instruction a very simple test would be:
51 // 51 //
52 // TEST(mov_x0_one) { 52 // TEST(mov_x0_one) {
(...skipping 10 matching lines...) Expand all
63 // TEARDOWN(); 63 // TEARDOWN();
64 // } 64 // }
65 // 65 //
66 // Within a START ... END block all registers but sp can be modified. sp has to 66 // Within a START ... END block all registers but sp can be modified. sp has to
67 // be explicitly saved/restored. The END() macro replaces the function return 67 // be explicitly saved/restored. The END() macro replaces the function return
68 // so it may appear multiple times in a test if the test has multiple exit 68 // so it may appear multiple times in a test if the test has multiple exit
69 // points. 69 // points.
70 // 70 //
71 // Once the test has been run all integer and floating point registers as well 71 // Once the test has been run all integer and floating point registers as well
72 // as flags are accessible through a RegisterDump instance, see 72 // as flags are accessible through a RegisterDump instance, see
73 // utils-a64.cc for more info on RegisterDump. 73 // utils-arm64.cc for more info on RegisterDump.
74 // 74 //
75 // We provide some helper assert to handle common cases: 75 // We provide some helper assert to handle common cases:
76 // 76 //
77 // ASSERT_EQUAL_32(int32_t, int_32t) 77 // ASSERT_EQUAL_32(int32_t, int_32t)
78 // ASSERT_EQUAL_FP32(float, float) 78 // ASSERT_EQUAL_FP32(float, float)
79 // ASSERT_EQUAL_32(int32_t, W register) 79 // ASSERT_EQUAL_32(int32_t, W register)
80 // ASSERT_EQUAL_FP32(float, S register) 80 // ASSERT_EQUAL_FP32(float, S register)
81 // ASSERT_EQUAL_64(int64_t, int_64t) 81 // ASSERT_EQUAL_64(int64_t, int_64t)
82 // ASSERT_EQUAL_FP64(double, double) 82 // ASSERT_EQUAL_FP64(double, double)
83 // ASSERT_EQUAL_64(int64_t, X register) 83 // ASSERT_EQUAL_64(int64_t, X register)
(...skipping 6208 matching lines...) Expand 10 before | Expand all | Expand 10 after
6292 ASSERT_EQUAL_FP64(2.5f, d4); 6292 ASSERT_EQUAL_FP64(2.5f, d4);
6293 ASSERT_EQUAL_FP64(-1.5f, d5); 6293 ASSERT_EQUAL_FP64(-1.5f, d5);
6294 ASSERT_EQUAL_FP64(-2.5f, d6); 6294 ASSERT_EQUAL_FP64(-2.5f, d6);
6295 ASSERT_EQUAL_FP64(kFP64PositiveInfinity, d7); 6295 ASSERT_EQUAL_FP64(kFP64PositiveInfinity, d7);
6296 ASSERT_EQUAL_FP64(kFP64NegativeInfinity, d8); 6296 ASSERT_EQUAL_FP64(kFP64NegativeInfinity, d8);
6297 ASSERT_EQUAL_FP64(0.0f, d9); 6297 ASSERT_EQUAL_FP64(0.0f, d9);
6298 ASSERT_EQUAL_FP64(-0.0f, d10); 6298 ASSERT_EQUAL_FP64(-0.0f, d10);
6299 ASSERT_EQUAL_FP64(FLT_MAX, d11); 6299 ASSERT_EQUAL_FP64(FLT_MAX, d11);
6300 ASSERT_EQUAL_FP64(FLT_MIN, d12); 6300 ASSERT_EQUAL_FP64(FLT_MIN, d12);
6301 6301
6302 // Check that the NaN payload is preserved according to A64 conversion rules: 6302 // Check that the NaN payload is preserved according to ARM64 conversion
6303 // rules:
6303 // - The sign bit is preserved. 6304 // - The sign bit is preserved.
6304 // - The top bit of the mantissa is forced to 1 (making it a quiet NaN). 6305 // - The top bit of the mantissa is forced to 1 (making it a quiet NaN).
6305 // - The remaining mantissa bits are copied until they run out. 6306 // - The remaining mantissa bits are copied until they run out.
6306 // - The low-order bits that haven't already been assigned are set to 0. 6307 // - The low-order bits that haven't already been assigned are set to 0.
6307 ASSERT_EQUAL_FP64(rawbits_to_double(0x7ff82468a0000000), d13); 6308 ASSERT_EQUAL_FP64(rawbits_to_double(0x7ff82468a0000000), d13);
6308 ASSERT_EQUAL_FP64(rawbits_to_double(0x7ff82468a0000000), d14); 6309 ASSERT_EQUAL_FP64(rawbits_to_double(0x7ff82468a0000000), d14);
6309 6310
6310 TEARDOWN(); 6311 TEARDOWN();
6311 } 6312 }
6312 6313
(...skipping 4458 matching lines...) Expand 10 before | Expand all | Expand 10 after
10771 if (RelocInfo::IsVeneerPool(info->rmode())) { 10772 if (RelocInfo::IsVeneerPool(info->rmode())) {
10772 ASSERT(info->data() == veneer_pool_size); 10773 ASSERT(info->data() == veneer_pool_size);
10773 ++pool_count; 10774 ++pool_count;
10774 } 10775 }
10775 } 10776 }
10776 10777
10777 ASSERT(pool_count == 2); 10778 ASSERT(pool_count == 2);
10778 10779
10779 TEARDOWN(); 10780 TEARDOWN();
10780 } 10781 }
OLDNEW
« no previous file with comments | « test/cctest/test-assembler-a64.cc ('k') | test/cctest/test-code-stubs-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698