2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>

Remove nested functions in efiemu core

	* efiemu/runtime/efiemu.c (reflect): make static instead of nested
This commit is contained in:
phcoder 2009-06-04 20:16:13 +00:00
parent cc6c3ac1bf
commit e8df1d4eb3
2 changed files with 22 additions and 16 deletions

View file

@ -1,3 +1,9 @@
2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
Remove nested functions in efiemu core
* efiemu/runtime/efiemu.c (reflect): make static instead of nested
2009-06-04 Vladimir Serbinenko <phcoder@gmail.com>
Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC

View file

@ -271,25 +271,25 @@ EFI_FUNC (efiemu_set_wakeup_time) (grub_efi_boolean_t enabled,
static grub_uint32_t crc32_table [256];
static grub_uint32_t
reflect (grub_uint32_t ref, int len)
{
grub_uint32_t result = 0;
int i;
for (i = 1; i <= len; i++)
{
if (ref & 1)
result |= 1 << (len - i);
ref >>= 1;
}
return result;
}
static void
init_crc32_table (void)
{
auto grub_uint32_t reflect (grub_uint32_t ref, int len);
grub_uint32_t reflect (grub_uint32_t ref, int len)
{
grub_uint32_t result = 0;
int i;
for (i = 1; i <= len; i++)
{
if (ref & 1)
result |= 1 << (len - i);
ref >>= 1;
}
return result;
}
grub_uint32_t polynomial = 0x04c11db7;
int i, j;