Fixing tests.

This commit is contained in:
Ben Vanik
2015-05-21 07:51:56 -07:00
parent fc4727c339
commit bac3f8c3bd
7 changed files with 23 additions and 6 deletions

View File

@@ -37,3 +37,14 @@ Disassembly of section .text:
10004c: 54 a5 f8 7e rlwinm r5,r5,31,1,31
100050: 7c a6 00 34 cntlzw r6,r5
100054: 4e 80 00 20 blr
0000000000100058 <test_cntlzw_5>:
100058: 7c a6 00 34 cntlzw r6,r5
10005c: 4e 80 00 20 blr
0000000000100060 <test_cntlzw_5_constant>:
100060: 38 a0 ff ff li r5,-1
100064: 78 a5 07 c6 rldicr r5,r5,32,31
100068: 38 a5 00 01 addi r5,r5,1
10006c: 7c a6 00 34 cntlzw r6,r5
100070: 4e 80 00 20 blr

View File

@@ -6,3 +6,5 @@
0000000000000030 t test_cntlzw_3_constant
0000000000000040 t test_cntlzw_4
0000000000000048 t test_cntlzw_4_constant
0000000000000058 t test_cntlzw_5
0000000000000060 t test_cntlzw_5_constant

View File

@@ -35,7 +35,7 @@ using xe::cpu::Runtime;
typedef std::vector<std::pair<std::string, std::string>> AnnotationList;
const uint32_t START_ADDRESS = 0x100000;
const uint32_t START_ADDRESS = 0x80000000;
struct TestCase {
TestCase(uint32_t address, std::string& name)
@@ -194,6 +194,9 @@ class TestRunner {
}
processor->AddModule(std::move(module));
processor->backend()->CommitExecutableRange(START_ADDRESS,
START_ADDRESS + 1024 * 1024);
// Simulate a thread.
uint32_t stack_size = 64 * 1024;
uint32_t stack_address = START_ADDRESS - stack_size;