This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I am trying to use the RESET assembly instruction from within an Exception handler on a MC68360 and it doesn’t seem to work like I would expect. As a matter of fact it doesn’t seem to work at all. Here is the assembly (I realize it Is not the best): _ProcessorException: ; Zero out the memory area upto 0x20 bytes move.w #$0,(_ExceptionStack) move.w #$0,(_ExceptionStack+$02) move.w #$0,(_ExceptionStack+$04) move.w #$0,(_ExceptionStack+$06) move.w #$0,(_ExceptionStack+$08) move.w #$0,(_ExceptionStack+$0a) move.w #$0,(_ExceptionStack+$0c) move.w #$0,(_ExceptionStack+$0e) move.w #$0,(_ExceptionStack+$10) move.w #$0,(_ExceptionStack+$12) move.w #$0,(_ExceptionStack+$14) move.w #$0,(_ExceptionStack+$16) ; Copy the first four words of the exception frame ; These four words are always there move.w (A7),(_ExceptionStack) move.w ($2,A7),(_ExceptionStack+$2) move.w ($4,A7),(_ExceptionStack+$4) move.w ($6,A7),(_ExceptionStack+$6) ; branch based on format (16 bits) move.l A7,a0 add.l #$06,a0 move.b (a0),d0 cmp #$00,d0 beq _Call_C_Exception cmp #$20,d0 beq _Six_Word_Frame cmp #$c0,d0 beq _Eigth_Word_Frame bra _Call_C_Exception ; Copy _Six_Word_Frame _Six_Word_Frame: move.w ($08,A7),(_ExceptionStack+$08) move.w ($0a,A7),(_ExceptionStack+$0a) bra _Call_C_Exception ;Copy _Eigth_Word_Frame _Eigth_Word_Frame: move.w ($08,A7),(_ExceptionStack+$08) move.w ($0a,A7),(_ExceptionStack+$0a) move.w ($0c,A7),(_ExceptionStack+$0c) move.w ($0e,A7),(_ExceptionStack+$0e) move.w ($10,A7),(_ExceptionStack+$10) move.w ($12,A7),(_ExceptionStack+$12) move.w ($14,A7),(_ExceptionStack+$14) move.w ($16,A7),(_ExceptionStack+$16) ; Call the C exception handler ; restart the card after the return _Call_C_Exception: jsr _CProcessorExceptionHandler reset rte jsr __main I have confirmed that I am hitting the code. But I seem to execute the RTE after the reset and this seem contradictory to what I understand. Is there a better way to force the reset from an exception? Thanks, ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |