Changeset 0dc2fec in mainline for kernel/arch/ia32/src/cpu/cpu.c


Ignore:
Timestamp:
2016-05-22T19:19:43Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b272c67a
Parents:
153c7a29 (diff), af2254ec (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/cpu/cpu.c

    r153c7a29 r0dc2fec  
    7272void fpu_disable(void)
    7373{
    74         asm volatile (
    75                 "mov %%cr0, %%eax\n"
    76                 "or $8, %%eax\n"
    77                 "mov %%eax, %%cr0\n"
    78                 ::: "%eax"
    79         );
     74        write_cr0(read_cr0() & ~CR0_TS);
    8075}
    8176
    8277void fpu_enable(void)
    8378{
    84         asm volatile (
    85                 "mov %%cr0, %%eax\n"
    86                 "and $0xffFFffF7, %%eax\n"
    87                 "mov %%eax,%%cr0\n"
    88                 ::: "%eax"
    89         );
     79        write_cr0(read_cr0() | CR0_TS);
    9080}
    9181
     
    115105                        "mov %[help], %%cr4\n"
    116106                        : [help] "+r" (help)
    117                         : [mask] "i" (CR4_OSFXSR_MASK | CR4_OSXMMEXCPT_MASK)
     107                        : [mask] "i" (CR4_OSFXSR | CR4_OSXMMEXCPT)
    118108                );
    119109        }
Note: See TracChangeset for help on using the changeset viewer.