Mercurial > sos > sos
changeset 139:adeb47dd7040
stop using the builtin functions in except.c
author | Jonathan Pevarnek <pevarnj@gmail.com> |
---|---|
date | Thu, 22 Sep 2011 13:54:57 -0400 |
parents | ea2136c52c35 |
children | 6179de7276a0 |
files | src/os/except.c |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/os/except.c Thu Sep 22 13:42:10 2011 -0400 +++ b/src/os/except.c Thu Sep 22 13:54:57 2011 -0400 @@ -1,6 +1,7 @@ #include <os/psw.h> #include <os/progint.h> #include <std.h> +#include <string.h> #include <stdio.h> extern void PROGINT(void); @@ -8,22 +9,22 @@ void init_prog_int() { Psw psw; - __builtin_memset(&psw, 0, sizeof(psw)); + memset(&psw, 0, sizeof(psw)); psw.ea = 1; psw.ba = 1; psw.ptr = (u64) &PROGINT; - __builtin_memcpy(((void*) PROGINT_PSW_NEW), &psw, sizeof(psw)); + memcpy(((void*) PROGINT_PSW_NEW), &psw, sizeof(psw)); } void prog_int_handler() { Psw psw; size_t i; char buffer[512]; - __builtin_memset(&psw, 0, sizeof(Psw)); //I am going to use the builtin ones + memset(&psw, 0, sizeof(Psw)); //I am going to use the builtin ones //for a bit longer while I think u64 *regStore = (u64*)PROGINT_REG_LOC; u64 regLoc[NUM_REGS]; - __builtin_memcpy((void*)regLoc, regStore, NUM_REGS*sizeof(u64)); + memcpy((void*)regLoc, regStore, NUM_REGS*sizeof(u64)); for(i = 0; i < NUM_REGS; i++) { sprintf(buffer, "REG %x: %x\n", i, regLoc[i]); sPrint(buffer);