Fix variable name collision

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-01-11 13:40:59 +01:00
parent d2601bb7bc
commit b56495543a
3 changed files with 10 additions and 11 deletions

View file

@ -35,11 +35,11 @@ extern grub_uint8_t grub_relocator_backward_end;
extern void *grub_relocator_backward_dest;
extern void *grub_relocator_backward_src;
extern grub_size_t grub_relocator_backward_size;
extern grub_size_t grub_relocator_backward_chunk_size;
extern void *grub_relocator_forward_dest;
extern void *grub_relocator_forward_src;
extern grub_size_t grub_relocator_forward_size;
extern grub_size_t grub_relocator_forward_chunk_size;
extern grub_uint32_t grub_relocator32_eax;
extern grub_uint32_t grub_relocator32_ebx;
@ -85,7 +85,7 @@ grub_cpu_relocator_backward (void *ptr, void *src, void *dest,
{
grub_relocator_backward_dest = dest;
grub_relocator_backward_src = src;
grub_relocator_backward_size = size;
grub_relocator_backward_chunk_size = size;
grub_memmove (ptr,
&grub_relocator_backward_start,
@ -98,7 +98,7 @@ grub_cpu_relocator_forward (void *ptr, void *src, void *dest,
{
grub_relocator_forward_dest = dest;
grub_relocator_forward_src = src;
grub_relocator_forward_size = size;
grub_relocator_forward_chunk_size = size;
grub_memmove (ptr,
&grub_relocator_forward_start,

View file

@ -36,7 +36,7 @@ VARIABLE(grub_relocator_backward_src)
/* mov imm32, %ecx */
.byte 0xb9
VARIABLE(grub_relocator_backward_size)
VARIABLE(grub_relocator_backward_chunk_size)
.long 0
add %ecx, %esi
@ -70,7 +70,7 @@ VARIABLE(grub_relocator_forward_src)
/* mov imm32, %ecx */
.byte 0xb9
VARIABLE(grub_relocator_forward_size)
VARIABLE(grub_relocator_forward_chunk_size)
.long 0
/* Forward copy. */

View file

@ -25,27 +25,26 @@ VARIABLE(grub_relocator_backward_start)
/* mov imm32, %rax */
.byte 0x48
.byte 0xb8
RELOCATOR_VARIABLE(dest)
VARIABLE(grub_relocator_backward_dest)
.long 0, 0
movq %rax, %rdi
/* mov imm64, %rax */
.byte 0x48
.byte 0xb8
RELOCATOR_VARIABLE(src)
VARIABLE(grub_relocator_backward_src)
.long 0, 0
movq %rax, %rsi
/* mov imm32, %ecx */
.byte 0x48
.byte 0xb9
RELOCATOR_VARIABLE(size)
VARIABLE(grub_relocator_backward_chunk_size)
.long 0, 0
add %rcx, %rsi
add %rcx, %rdi
/* Backward movsb is implicitly off-by-one. compensate that. */
sub $1, %rsi
sub $1, %rdi
@ -77,7 +76,7 @@ VARIABLE(grub_relocator_forward_src)
/* mov imm64, %rcx */
.byte 0x48
.byte 0xb9
VARIABLE(grub_relocator_forward_size)
VARIABLE(grub_relocator_forward_chunk_size)
.long 0, 0
/* Forward copy. */