1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-30 15:00:21 +02:00

Merge upstream 'lightening'

* libguile/lightening: Merge from https://gitlab.com/wingo/lightening.
This commit is contained in:
Andy Wingo 2020-06-19 16:26:53 +02:00
commit 85d2766aa4
2 changed files with 12 additions and 5 deletions

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2012-2017, 2019 Free Software Foundation, Inc. * Copyright (C) 2012-2017,2019-2020 Free Software Foundation, Inc.
* *
* This file is part of GNU lightning. * This file is part of GNU lightning.
* *
@ -195,8 +195,15 @@ emit_wide_thumb(jit_state_t *_jit, uint32_t inst)
emit_u16_with_pool(_jit, inst & 0xffff); emit_u16_with_pool(_jit, inst & 0xffff);
} }
/* from binutils */ static uint32_t
# define rotate_left(v, n) (v << n | v >> (32 - n)) rotate_left(uint32_t v, uint32_t n) {
if (n == 0) {
return v;
}
ASSERT(n < 32);
return (v << n | v >> (32 - n));
}
static int static int
encode_arm_immediate(unsigned int v) encode_arm_immediate(unsigned int v)
{ {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2012-2019 Free Software Foundation, Inc. * Copyright (C) 2012-2020 Free Software Foundation, Inc.
* *
* This file is part of GNU lightning. * This file is part of GNU lightning.
* *
@ -1241,8 +1241,8 @@ static void
reset_literal_pool(jit_state_t *_jit, struct jit_literal_pool *pool) reset_literal_pool(jit_state_t *_jit, struct jit_literal_pool *pool)
{ {
pool->deadline = _jit->limit - _jit->start; pool->deadline = _jit->limit - _jit->start;
pool->size = 0;
memset(pool->entries, 0, sizeof(pool->entries[0]) * pool->size); memset(pool->entries, 0, sizeof(pool->entries[0]) * pool->size);
pool->size = 0;
} }
#define INITIAL_LITERAL_POOL_CAPACITY 12 #define INITIAL_LITERAL_POOL_CAPACITY 12