/drivers/ddk/core.S |
---|
3,7 → 3,7 |
.intel_syntax |
.text |
.global _AcpiGetRootPtr |
.global _AllocKernelSpace |
.global _AllocPage |
.global _AllocPages |
83,7 → 83,6 |
.global _WaitEvent |
.global _WaitEventTimeout |
.def _AcpiGetRootPtr; .scl 2; .type 32; .endef |
.def _AllocKernelSpace; .scl 2; .type 32; .endef |
.def _AllocPage; .scl 2; .type 32; .endef |
165,7 → 164,6 |
.def _WaitEvent; .scl 2; .type 32; .endef |
.def _WaitEventTimeout; .scl 2; .type 32; .endef |
_AcpiGetRootPtr: |
_AllocKernelSpace: |
_AllocPage: |
248,7 → 246,6 |
.section .drectve |
.ascii " -export:AcpiGetRootPtr" # |
.ascii " -export:AllocKernelSpace" # stdcall |
.ascii " -export:AllocPage" # gcc ABI |
/drivers/ddk/io/create.c |
---|
2,11 → 2,10 |
int create_file(const char *path) |
{ |
int retval; |
int count; |
__asm__ __volatile__ ( |
"pushl $0 \n\t" |
"pushl $0 \n\t" |
"movl %2, 1(%%esp) \n\t" |
"movl %0, 1(%%esp) \n\t" |
"pushl $0 \n\t" |
"pushl $0 \n\t" |
"pushl $0 \n\t" |
16,8 → 15,8 |
"movl $70, %%eax \n\t" |
"int $0x40 \n\t" |
"addl $28, %%esp \n\t" |
:"=a" (retval), "=b"(count) |
:"=a" (retval) |
:"r" (path) |
); |
:"ebx"); |
return retval; |
}; |
/drivers/ddk/io/finfo.c |
---|
59,13 → 59,12 |
int get_fileinfo(const char *path,FILEINFO *info) |
{ |
int retval; |
int tmp; |
asm __volatile__ |
( |
"pushl $0 \n\t" |
"pushl $0 \n\t" |
"movl %2, 1(%%esp) \n\t" |
"movl %0, 1(%%esp) \n\t" |
"pushl %%ebx \n\t" |
"pushl $0 \n\t" |
"pushl $0 \n\t" |
75,7 → 74,7 |
"movl $70, %%eax \n\t" |
"int $0x40 \n\t" |
"addl $28, %%esp \n\t" |
:"=a" (retval),"=b"(tmp) |
:"=a" (retval) |
:"r" (path), "b" (info) |
); |
return retval; |
/drivers/ddk/io/ssize.c |
---|
2,11 → 2,10 |
int set_file_size(const char *path, unsigned size) |
{ |
int retval; |
int tmp; |
__asm__ __volatile__( |
"pushl $0 \n\t" |
"pushl $0 \n\t" |
"movl %2, 1(%%esp) \n\t" |
"movl %0, 1(%%esp) \n\t" |
"pushl $0 \n\t" |
"pushl $0 \n\t" |
"pushl $0 \n\t" |
16,7 → 15,7 |
"movl $70, %%eax \n\t" |
"int $0x40 \n\t" |
"addl $28, %%esp \n\t" |
:"=a" (retval), "=b"(tmp) |
:"r" (path), "b" (size)); |
:"=a" (retval) |
:"a" (path), "b" (size)); |
return retval; |
}; |
/drivers/ddk/io/write.c |
---|
3,7 → 3,6 |
unsigned offset,unsigned count,unsigned *writes) |
{ |
int retval; |
unsigned cnt; |
__asm__ __volatile__( |
"pushl $0 \n\t" |
"pushl $0 \n\t" |
16,10 → 15,12 |
"movl %%esp, %%ebx \n\t" |
"mov $70, %%eax \n\t" |
"int $0x40 \n\t" |
"testl %%esi, %%esi \n\t" |
"jz 1f \n\t" |
"movl %%ebx, (%%esi) \n\t" |
"1:" |
"addl $28, %%esp \n\t" |
:"=a" (retval), "=b"(cnt) |
:"a"(path),"b"(buff),"c"(offset),"d"(count)); |
if(writes) |
*writes = cnt; |
:"=a" (retval) |
:"a"(path),"b"(buff),"c"(offset),"d"(count),"S"(writes)); |
return retval; |
}; |