Page 1 of 1

gcc has internal error at ljmp

Posted: Sun Mar 18, 2007 5:28 pm
by iammisc
In gas i try to do

ljmp $0x20,$(%eax)

but gas says internal compiler error. please report this bug.

that is all fine and dandy(the bug reporting thing) but how do i compile my kernel.

Posted: Mon Mar 19, 2007 3:15 am
by Combuster
you are trying to assemble something that an intel processor can't do:

according to intel's big book of patterns you can only:
JMP FAR immediate:immediate
or
JMP FAR [far_pointer_in_memory]

you can not:
JMP FAR immediate:register
and especially not
JMP FAR 0x20:[DS:EAX]
Which throughly messes up GAS into asking you to go tell the developers...

Posted: Mon Mar 19, 2007 5:07 pm
by iammisc
um. i never knew that.

It also says i can't do inter-privelege-level jmps so how do i call a callback in userspace? For my ipc i want to call a callback function for each message received, however i need to know how to do this.

thanks.