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