mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-12-25 09:29:48 +00:00
Increase testing of CPU branch logic, include 16bit underflow and overflow
- Unlikely that the original Apple //e ever saw this happen in reality? - TODO : test with valgrind for invalid code access ...
This commit is contained in:
parent
d8ae71ddb0
commit
20d3a67db8
@ -7354,7 +7354,27 @@ GREATEST_SUITE(test_suite_cpu) {
|
||||
HASH_ITER(hh, test_funcs, func, tmp) {
|
||||
fprintf(GREATEST_STDOUT, "\n%s (SILENCED OUTPUT) :\n", func->name);
|
||||
|
||||
for (uint16_t addrs = 0x1f02; addrs < 0x2000; addrs+=0x80) {
|
||||
for (uint16_t addrs = 0x1f02; addrs < 0x2000; addrs++) {
|
||||
for (uint8_t flag = 0x00; flag < 0x02; flag++) {
|
||||
uint8_t off=0x00;
|
||||
do {
|
||||
A2_RUN_TESTp( func->func, off, flag, addrs);
|
||||
} while (++off);
|
||||
}
|
||||
}
|
||||
|
||||
// 16bit branch overflow tests
|
||||
for (uint16_t addrs = 0xff00; addrs >= 0xff00 || addrs < 0x00fe; addrs++) {
|
||||
for (uint8_t flag = 0x00; flag < 0x02; flag++) {
|
||||
uint8_t off=0x00;
|
||||
do {
|
||||
A2_RUN_TESTp(func->func, off, flag, addrs);
|
||||
} while (++off);
|
||||
}
|
||||
}
|
||||
|
||||
// 16bit branch underflow tests
|
||||
for (uint16_t addrs = 0x00fe; addrs <= 0x00fe || addrs > 0xff00; addrs--) {
|
||||
for (uint8_t flag = 0x00; flag < 0x02; flag++) {
|
||||
uint8_t off=0x00;
|
||||
do {
|
||||
|
Loading…
Reference in New Issue
Block a user