error_code asm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!
A litte thing I noticed and wonder about. I looked at error_code in 
arch/i386/kernel/entry.S. And this is how it starts (in 2.6.7):

error_code:
 pushl %ds
 pushl %eax
 xorl %eax, %eax
 pushl %ebp
 pushl %edi
 pushl %esi
 pushl %edx
 decl %eax   # eax = -1
 pushl %ecx
 pushl %ebx

My question is why the 'decl %eax' is 4 lines after the clearing of eax 'xorl 
%eax %eax'. Can't it just be put right after xorl?

Of course you can put it anywhere you want, but I wonder if there is a 
particular reason to put it there, or is just some personal taste?

/Michael

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux