Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9337 → Rev 9338

/kernel/trunk/runtests.py
171,10 → 171,10
return thread
 
def gcc(fin, fout):
flags = "-m32 -std=c11 -g -O0 -masm=intel -fno-pie -w"
flags = "-m32 -std=c11 -g -O0 -fno-pie -w" # -masm-intel
defines = "-D_FILE_OFFSET_BITS=64 -DNDEBUG -D_POSIX_C_SOURCE=200809L"
include = "-Iumka -Iumka/linux"
command = f"gcc {flags} {defines} {include} -c {fin} -o {fout}"
command = f"clang {flags} {defines} {include} -c {fin} -o {fout}"
print(command)
os.system(command)
 
195,8 → 195,6
os.makedirs("umka/build/linux", exist_ok = True)
sources = [ "umka_shell.c",
"shell.c",
"trace.c",
"trace_lbr.c",
"vdisk.c",
"lodepng.c",
"linux/pci.c",
/kernel/trunk/umka/umka.asm
11,6 → 11,7
 
UMKA_MEMORY_BYTES = 256 SHL 20
 
public umka_sys_put_image_palette
public disk_add
public disk_del
public disk_list
570,6 → 571,26
ret
endp
 
proc umka_sys_put_image_palette c, image, xsize, ysize, x, y, bpp, palette, row_offset
pushad
push ebp
mov eax, 65
mov ebx, [image]
mov ecx, [xsize]
shl ecx, 16
or ecx, [ysize]
mov edx, [x]
shl edx, 16
or edx, [y]
mov esi, [bpp]
mov edi, [palette]
mov ebp, [row_offset]
call i40
pop ebp
popad
ret
endp
 
extrn reset_procmask
extrn get_fake_if
public irq0
/kernel/trunk/umka/umka.h
448,13 → 448,13
umka_new_sys_threads(uint32_t flags, void (*entry)(), void *stack) {
size_t tid;
__asm__ __inline__ __volatile__ (
"push ebx;"
"push esi;"
"push edi;"
"push %%ebx;"
"push %%esi;"
"push %%edi;"
"call kos_new_sys_threads;"
"pop edi;"
"pop esi;"
"pop ebx"
"pop %%edi;"
"pop %%esi;"
"pop %%ebx"
: "=a"(tid)
: "b"(flags),
"c"(entry),
876,8 → 876,8
find_next_task_t fnt;
__asm__ __inline__ __volatile__ (
"call find_next_task;"
"setz al;"
"movzx eax, al"
"setz %%al;"
"movzx %%eax, %%al"
: "=b"(fnt.appdata),
"=D"(fnt.taskdata),
"=a"(fnt.same)
889,10 → 889,10
static inline void
umka_i40(pushad_t *regs) {
__asm__ __inline__ __volatile__ (
"push ebp;"
"mov ebp, %[ebp];"
"push %%ebp;"
"mov %%ebp, %[ebp];"
"call i40;"
"pop ebp"
"pop %%ebp"
: "=a"(regs->eax),
"=b"(regs->ebx)
: "a"(regs->eax),
1322,25 → 1322,10
: "memory");
}
 
static inline void
void
umka_sys_put_image_palette(void *image, size_t xsize, size_t ysize,
size_t x, size_t y, size_t bpp, void *palette,
size_t row_offset) {
__asm__ __inline__ __volatile__ (
"push ebp;"
"mov ebp, %[row_offset];"
"call i40;"
"pop ebp"
:
: "a"(65),
"b"(image),
"c"((xsize << 16) + ysize),
"d"((x << 16) + y),
"S"(bpp),
"D"(palette),
[row_offset] "Rm"(row_offset)
: "memory");
}
size_t row_offset);
 
static inline void
umka_sys_move_window(size_t x, size_t y, ssize_t xsize, ssize_t ysize) {