Browse Source
Merge pull request #18 from tromey/fix-some-warnings
Fix some warnings
pull/21/head
Aleksey Demakov
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
16 additions and
6 deletions
-
ChangeLog
-
jit/jit-apply-x86-64.c
-
jit/jit-apply.c
-
jit/jit-elf-read.c
-
jit/jit-rules-x86-64.c
|
|
@ -1,3 +1,14 @@ |
|
|
|
2019-12-27 Tom Tromey <tom@tromey.com> |
|
|
|
|
|
|
|
* jit/jit-rules-x86-64.c (_jit_gen_load_value): Remove unused |
|
|
|
variable. |
|
|
|
* jit/jit-elf-read.c (jit_readelf_num_needed) |
|
|
|
(jit_readelf_get_needed): Change type of "type". |
|
|
|
* jit/jit-apply-x86-64.c (_jit_create_closure): Remove unused |
|
|
|
variable. |
|
|
|
* jit/jit-apply.c (jit_apply_builder_get_return): Make "size" |
|
|
|
conditional. |
|
|
|
|
|
|
|
2019-10-01 Jakob Löw <jakob@m4gnus.de> |
|
|
|
|
|
|
|
* jit/jit-insn.c: Fix a segmentation fault bug when converting byte/short |
|
|
|
|
|
@ -47,7 +47,6 @@ void _jit_create_closure(unsigned char *buf, void *func, |
|
|
|
void *closure, void *_type) |
|
|
|
{ |
|
|
|
jit_nint offset; |
|
|
|
jit_type_t signature = (jit_type_t)_type; |
|
|
|
|
|
|
|
/* Set up the local stack frame */ |
|
|
|
x86_64_push_reg_size(buf, X86_64_RBP, 8); |
|
|
|
|
|
@ -239,7 +239,9 @@ static void |
|
|
|
jit_apply_builder_get_return(jit_apply_builder *builder, void *rv, |
|
|
|
jit_type_t type, jit_apply_return *result) |
|
|
|
{ |
|
|
|
#ifndef HAVE_JIT_BUILTIN_APPLY_STRUCT_RETURN |
|
|
|
unsigned int size; |
|
|
|
#endif |
|
|
|
|
|
|
|
switch(type->kind) |
|
|
|
{ |
|
|
|
|
|
@ -1363,7 +1363,7 @@ unsigned int jit_readelf_num_needed(jit_readelf_t readelf) |
|
|
|
{ |
|
|
|
jit_dynamic_iter_t iter; |
|
|
|
unsigned int count = 0; |
|
|
|
jit_int type; |
|
|
|
jit_uint type; |
|
|
|
Elf_Addr value; |
|
|
|
dynamic_iter_init(&iter, readelf); |
|
|
|
while(dynamic_iter_next(&iter, &type, &value)) |
|
|
@ -1386,7 +1386,7 @@ unsigned int jit_readelf_num_needed(jit_readelf_t readelf) |
|
|
|
const char *jit_readelf_get_needed(jit_readelf_t readelf, unsigned int index) |
|
|
|
{ |
|
|
|
jit_dynamic_iter_t iter; |
|
|
|
jit_int type; |
|
|
|
jit_uint type; |
|
|
|
Elf_Addr value; |
|
|
|
dynamic_iter_init(&iter, readelf); |
|
|
|
while(dynamic_iter_next(&iter, &type, &value)) |
|
|
|
|
|
@ -1705,7 +1705,7 @@ void |
|
|
|
_jit_gen_load_value(jit_gencode_t gen, int reg, int other_reg, jit_value_t value) |
|
|
|
{ |
|
|
|
jit_type_t type; |
|
|
|
int src_reg, other_src_reg; |
|
|
|
int src_reg; |
|
|
|
void *ptr; |
|
|
|
int offset; |
|
|
|
|
|
|
@ -2003,12 +2003,10 @@ _jit_gen_load_value(jit_gencode_t gen, int reg, int other_reg, jit_value_t value |
|
|
|
if(value->in_register) |
|
|
|
{ |
|
|
|
src_reg = value->reg; |
|
|
|
other_src_reg = -1; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
src_reg = value->global_reg; |
|
|
|
other_src_reg = -1; |
|
|
|
} |
|
|
|
|
|
|
|
switch(type->kind) |
|
|
|