confused by code in setup.S

From: Timur Tabi (ttabi@interactivesi.com)
Date: Thu May 04 2000 - 17:10:55 EST


This is my first post to this list, so please be gentle. :-)

I'm studying the memory-sizing code (aka E820) in setup.S of 2.3.99-pre6,
because I think I may need to modify it for our purposes. I found something odd
on line 306:

movw %di, %ax
addw $20,%ax
movw %ax,%di

I don't understand why it isn't just:

addw $20,%di

%ax is always overwritten after these three instructions, so it's not like the
code needs to set both %ax and %di. And even if it were, this code:

addw $20,%di
movw %di, %ax

would be more efficient.

--
Timur Tabi - ttabi@interactivesi.com
Interactive Silicon - http://www.interactivesi.com

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:16 EST