Skip to content

Commit d4a456d

Browse files
author
none
committed
NatFeat: test case
1 parent a58c4bd commit d4a456d

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

tests/m68k_misc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,13 @@ extern uint32_t _nfCall(uint32_t ID, ...);
123123
*/
124124
__asm__
125125
(
126+
"_detect_native_features: \n"
126127
#if defined(__mc68010) || defined(__mc68020) || defined(__mc68030) || defined(__mc68040)
127128
" movec %vbr, %a0 \n"
128129
" add.l #0x10, %a0 \n"
129130
#else
130131
" move.l #0x10, %a0 \n"
131132
#endif
132-
"_detect_native_features: \n"
133133
" moveq #0, %d0 /* assume no NatFeats available */ \n"
134134
" move.l %sp, %a1 \n"
135135
" move.l (%a0), %d1 \n"

tests/simple/Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
CC = m68k-unknown-elf-gcc
2-
SIZE = m68k-unknown-elf-size
1+
CC = m68k-elf-gcc
2+
SIZE = m68k-elf-size
33
PROG = test
44
DISKFILE = disk.dmg
55

@@ -19,7 +19,7 @@ CFLAGS = -m68010 \
1919
-Wl,-gc-sections \
2020
-Wl,--emit-relocs \
2121
-Wl,-z,stack-size=1048576 \
22-
-Wl,--section-start=.text=0 \
22+
-Wl,--section-start=.text=0x1000 \
2323
-MD \
2424
-e main
2525

tests/simple/main.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ main(void)
187187
current_time = TIMER_COUNT;
188188
TIMER_COUNT = 500;
189189
while (timer_ticks == 0) {
190-
assert(TIMER_COUNT < (current_time + 5000));
190+
assert(TIMER_COUNT < (current_time + 50000));
191191
}
192192
fprintf(stderr, "countdown interrupt works\n");
193193

@@ -203,6 +203,8 @@ main(void)
203203
fprintf(stderr, "disk: tests pass\n");
204204
}
205205

206+
fprintf(stderr, "native features %ssupported\n", _detect_native_features() ? "" : "not ");
207+
206208
fprintf(stderr, "tests complete\n");
207209
fflush(stdout);
208210
nf_exit();

0 commit comments

Comments
 (0)