Skip to content

Commit ec03532

Browse files
committed
[cpu] Test cpu-test on travis
1 parent de6dab4 commit ec03532

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ script:
6262
# Build and run base tests.
6363
- if [[ $BUILD == true ]]; then ./xenia-build build --config=$CONFIG --target=xenia-base-tests; fi
6464
- if [[ $BUILD == true ]]; then ./build/bin/Linux/$CONFIG/xenia-base-tests; fi
65+
# Build and run cpu tests.
66+
- if [[ $BUILD == true ]]; then ./xenia-build build --config=$CONFIG --target=xenia-cpu-tests; fi
67+
- if [[ $BUILD == true ]]; then ./build/bin/Linux/$CONFIG/xenia-cpu-tests; fi
6568
# Build and run ppc tests.
6669
- if [[ $BUILD == true ]]; then ./xenia-build gentests; fi
6770
- if [[ $BUILD == true ]]; then ./xenia-build build --config=$CONFIG --target=xenia-cpu-ppc-tests; fi

src/xenia/cpu/testing/add_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ TEST_CASE("ADD_I64", "[instr]") {
265265
},
266266
[](PPCContext* ctx) {
267267
auto result = ctx->r[3];
268-
REQUIRE(result == -15);
268+
REQUIRE(result == static_cast<uint64_t>(-15));
269269
});
270270
test.Run(
271271
[](PPCContext* ctx) {

src/xenia/cpu/testing/pack_test.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ TEST_CASE("PACK_FLOAT16_2", "[instr]") {
5151
},
5252
[](PPCContext* ctx) {
5353
auto result = ctx->v[3];
54-
REQUIRE(result == vec128i(0, 0, 0, 0x7FFFFFFF));
54+
REQUIRE(result == vec128i(0, 0, 0, 0x7BFFFBFF));
5555
});
5656
test.Run(
5757
[](PPCContext* ctx) {
@@ -80,7 +80,7 @@ TEST_CASE("PACK_FLOAT16_4", "[instr]") {
8080
[](PPCContext* ctx) {
8181
auto result = ctx->v[3];
8282
REQUIRE(result ==
83-
vec128i(0x00000000, 0x00000000, 0x64D26D8C, 0x48824491));
83+
vec128i(0x00000000, 0x00000000, 0x64D26D8B, 0x48814491));
8484
});
8585
}
8686

@@ -92,7 +92,8 @@ TEST_CASE("PACK_SHORT_2", "[instr]") {
9292
test.Run([](PPCContext* ctx) { ctx->v[4] = vec128i(0); },
9393
[](PPCContext* ctx) {
9494
auto result = ctx->v[3];
95-
REQUIRE(result == vec128i(0));
95+
REQUIRE(result ==
96+
vec128i(0x00000000, 0x00000000, 0x00000000, 0x80018001));
9697
});
9798
test.Run(
9899
[](PPCContext* ctx) {

src/xenia/cpu/testing/unpack_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ TEST_CASE("UNPACK_FLOAT16_2", "[instr]") {
5555
[](PPCContext* ctx) {
5656
auto result = ctx->v[3];
5757
REQUIRE(result ==
58-
vec128i(0x47FFE000, 0xC7FFE000, 0x00000000, 0x3F800000));
58+
vec128i(0x7FFFE000, 0xFFFFE000, 0x00000000, 0x3F800000));
5959
});
6060
test.Run([](PPCContext* ctx) { ctx->v[4] = vec128i(0, 0, 0, 0x55556666); },
6161
[](PPCContext* ctx) {

src/xenia/cpu/testing/util.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ class TestFunction {
7373
uint32_t stack_address = memory_size - stack_size;
7474
uint32_t thread_state_address = stack_address - 0x1000;
7575
auto thread_state = std::make_unique<ThreadState>(processor.get(), 0x100);
76-
assert_always(); // TODO: Allocate a thread stack!!!
7776
auto ctx = thread_state->context();
7877
ctx->lr = 0xBCBCBCBC;
7978

0 commit comments

Comments
 (0)