Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
1135 Discussions

Why only CS, IP and EFLAGS are saved while interrupt??

cgopi24
Beginner
566 Views
I am new to assembly programming. I was reading about 386 Interrupt. I came to know that only CS, IP and EFLAGS are saved as a part of interrupt, they pop back when we have iret. But I am wondering, why they didnt save all the visible registers, segments register etc.,???

Please excuse me, if I understood something wrong.

Thanks for your effort in helping me...
0 Kudos
1 Reply
SHIH_K_Intel
Employee
566 Views
Quoting - cgopi24
I am new to assembly programming. I was reading about 386 Interrupt. I came to know that only CS, IP and EFLAGS are saved as a part of interrupt, they pop back when we have iret. But I am wondering, why they didnt save all the visible registers, segments register etc.,???

Please excuse me, if I understood something wrong.

Thanks for your effort in helping me...

Saving only the minimal set of resources to facilitate iret to return control provides more flexibility for programmers to implement interrupt handler without carrying unnecessary overhead.

If a handler modifies ES, for example, it has the responsibility to restore its value prior to iret.

If a handler didn't need to touch ES, would you want the HW for impose the overhead?
0 Kudos
Reply