Changeset b539f54 in mainline


Ignore:
Timestamp:
2010-07-12T16:33:06Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8078180
Parents:
efbd094
Message:

Do not clobber preserved register EBX.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/asm.S

    refbd094 rb539f54  
    389389         * Save the selector registers.
    390390         */
    391         movl %gs, %eax
    392         movl %fs, %ebx
     391        movl %gs, %ecx
     392        movl %fs, %edx
     393
     394        movl %ecx, ISTATE_OFFSET_GS(%esp)
     395        movl %edx, ISTATE_OFFSET_FS(%esp)
     396
    393397        movl %es, %ecx
    394398        movl %ds, %edx
    395399       
    396         movl %eax, ISTATE_OFFSET_GS(%esp)
    397         movl %ebx, ISTATE_OFFSET_FS(%esp)
    398400        movl %ecx, ISTATE_OFFSET_ES(%esp)
    399401        movl %edx, ISTATE_OFFSET_DS(%esp)
     
    434436                 * Restore the selector registers.
    435437                 */
    436                 movl ISTATE_OFFSET_GS(%esp), %eax
    437                 movl ISTATE_OFFSET_FS(%esp), %ebx
     438                movl ISTATE_OFFSET_GS(%esp), %ecx
     439                movl ISTATE_OFFSET_FS(%esp), %edx
     440
     441                movl %ecx, %gs
     442                movl %edx, %fs
     443
    438444                movl ISTATE_OFFSET_ES(%esp), %ecx
    439445                movl ISTATE_OFFSET_DS(%esp), %edx
    440446               
    441                 movl %eax, %gs
    442                 movl %ebx, %fs
    443447                movl %ecx, %es
    444448                movl %edx, %ds
     
    447451                 * Restore the scratch registers and the preserved
    448452                 * registers the handler cloberred itself
    449                  * (i.e. EBX and EBP).
     453                 * (i.e. EBP).
    450454                 */
    451455                movl ISTATE_OFFSET_EAX(%esp), %eax
    452                 movl ISTATE_OFFSET_EBX(%esp), %ebx
    453456                movl ISTATE_OFFSET_ECX(%esp), %ecx
    454457                movl ISTATE_OFFSET_EDX(%esp), %edx
Note: See TracChangeset for help on using the changeset viewer.