This commit is contained in:
Kartik Agaram 2018-10-01 22:48:50 -07:00
parent 839dc88dc0
commit 29ab43973a
2 changed files with 9 additions and 0 deletions

View File

@ -82,6 +82,7 @@ void process_int80() {
// Ignore most arguments for now: address hint, protection flags, sharing flags, fd, offset.
// We only support anonymous maps.
Reg[EAX].u = new_segment(/*length*/read_mem_u32(Reg[EBX].u+0x4));
trace(91, "run") << "result: " << Reg[EAX].u << end();
break;
default:
raise << HEXWORD << EIP << ": unimplemented syscall " << Reg[EAX].u << '\n' << end();

View File

@ -121,6 +121,14 @@ test `uname` = 'Linux' && {
grep -vq 'F' ex11.out # no test failures
}
echo ex12
CFLAGS=-g ./subx translate examples/ex12.subx -o examples/ex12
test `uname -m` = 'i686' && git diff --quiet examples/ex12
CFLAGS=-g ./subx run examples/ex12 # final byte of mmap'd address is well-nigh guaranteed to be 0
test `uname` = 'Linux' && {
examples/ex12 # final byte of mmap'd address is well-nigh guaranteed to be 0
}
echo factorial
CFLAGS=-g ./subx translate *.subx apps/factorial.subx -o apps/factorial
test `uname -m` = 'i686' && git diff --quiet apps/factorial