2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
Absolute addressing through constant with Apple's cc * kern/i386/pc/startup.S: Define necessary constants and address through it when using ABS with Apple's CC * boot/i386/pc/diskboot.S: likewise * boot/i386/pc/boot.S: likewise * boot/i386/pc/lnxboot.S: likewise * boot/i386/pc/cdboot.S: likewise * mmap/i386/pc/mmap_helper.S: likewise * commands/i386/pc/drivemap_int13h.S: likewise
This commit is contained in:
parent
2b167a7218
commit
3e32590112
8 changed files with 214 additions and 1 deletions
|
@ -28,7 +28,11 @@
|
|||
#define ABS(x) (x-_start+GRUB_BOOT_MACHINE_KERNEL_ADDR)
|
||||
|
||||
/* Print message string */
|
||||
#ifdef APPLE_CC
|
||||
#define MSG(x) x ## _abs = ABS(x); mov $x ## _abs, %esi; call message
|
||||
#else
|
||||
#define MSG(x) movw $ABS(x), %si; call message
|
||||
#endif
|
||||
|
||||
.file "diskboot.S"
|
||||
|
||||
|
@ -61,7 +65,12 @@ _start:
|
|||
popw %si
|
||||
|
||||
/* this sets up for the first run through "bootloop" */
|
||||
#ifdef APPLE_CC
|
||||
firstlist_off_abs = ABS (firstlist - GRUB_BOOT_MACHINE_LIST_SIZE)
|
||||
movl $firstlist_off_abs, %edi
|
||||
#else
|
||||
movw $ABS(firstlist - GRUB_BOOT_MACHINE_LIST_SIZE), %di
|
||||
#endif
|
||||
|
||||
/* save the sector number of the second sector in %ebp */
|
||||
movl (%di), %ebp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue