[lkml]   [2004]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subjectswsusp.S: meaningfull assembly labels

This introduces meaningfull labels instead of .L1234, meaning code is
readable, kills alignment where unneccessary, and kills TLB flush that
was only pure paranoia (and slows it down a lot on emulated
systems). Please apply,


--- linux-cvs//arch/i386/power/swsusp.S 2004-05-25 17:41:18.000000000 +0200
+++ linux/arch/i386/power/swsusp.S 2004-06-24 14:39:01.000000000 +0200
@@ -18,7 +18,7 @@
pushl %ebx
cmpl $0,8(%esp)
- jne .L1450
+ jne resume
call do_magic_suspend_1
call save_processor_state

@@ -33,21 +33,21 @@
pushfl ; popl saved_context_eflags

call do_magic_suspend_2
- jmp .L1449
- .p2align 4,,7
+ popl %ebx
+ ret
movl $swsusp_pg_dir-__PAGE_OFFSET,%ecx
movl %ecx,%cr3

call do_magic_resume_1
movl $0,loop
cmpl $0,nr_copy_pages
- je .L1453
- .p2align 4,,7
+ je copy_done
movl $0,loop2
.p2align 4,,7
movl pagedir_nosave,%ecx
movl loop,%eax
movl loop2,%edx
@@ -56,23 +56,21 @@
movl (%ecx,%eax),%eax
movb (%edx,%eax),%al
movb %al,(%edx,%ebx)
- movl %cr3, %eax;
- movl %eax, %cr3; # flush TLB

movl loop2,%eax
leal 1(%eax),%edx
movl %edx,loop2
movl %edx,%eax
cmpl $4095,%eax
- jbe .L1459
+ jbe copy_one_page
movl loop,%eax
leal 1(%eax),%edx
movl %edx,loop
movl %edx,%eax
cmpl nr_copy_pages,%eax
- jb .L1455
- .p2align 4,,7
+ jb copy_loop
movl $__USER_DS,%eax

movw %ax, %ds
@@ -88,7 +86,6 @@
call restore_processor_state
pushl saved_context_eflags ; popfl
call do_magic_resume_2
popl %ebx

People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:04    [from the cache]
©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site