[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 03/10] target/hexagon: make helper functions non-static
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [RFC PATCH 03/10] target/hexagon: make helper functions non-static |
Date: |
Fri, 12 Feb 2021 00:04:10 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
On 2/11/21 10:50 PM, Alessandro Di Federico via wrote:
> From: Paolo Montesel <babush@rev.ng>
>
> Move certain helper functions required by code generated by the
> idef-parser available outside genptr.c, moving them into macros.h.
>
^ OK
> This patch also introduces the gen_cancel and gen_fbrev helper which
> will be used by idef-parser.
No, it doesn't. Probably old comment?
Removing it:
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> Signed-off-by: Alessandro Di Federico <ale@rev.ng>
> ---
> target/hexagon/genptr.c | 13 ++++++++++---
> target/hexagon/genptr.h | 7 +++++++
> 2 files changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/target/hexagon/genptr.c b/target/hexagon/genptr.c
> index 7481f4c1dd..97de669f38 100644
> --- a/target/hexagon/genptr.c
> +++ b/target/hexagon/genptr.c
> @@ -26,8 +26,15 @@
> #include "translate.h"
> #include "macros.h"
> #include "gen_tcg.h"
> +#include "genptr.h"
>
> -static inline TCGv gen_read_preg(TCGv pred, uint8_t num)
> +TCGv gen_read_reg(TCGv result, int num)
> +{
> + tcg_gen_mov_tl(result, hex_gpr[num]);
> + return result;
> +}
> +
> +TCGv gen_read_preg(TCGv pred, uint8_t num)
> {
> tcg_gen_mov_tl(pred, hex_pred[num]);
> return pred;
> @@ -53,7 +60,7 @@ static inline void gen_log_predicated_reg_write(int rnum,
> TCGv val, int slot)
> tcg_temp_free(slot_mask);
> }
>
> -static inline void gen_log_reg_write(int rnum, TCGv val)
> +void gen_log_reg_write(int rnum, TCGv val)
> {
> tcg_gen_mov_tl(hex_new_value[rnum], val);
> #if HEX_DEBUG
> @@ -116,7 +123,7 @@ static void gen_log_reg_write_pair(int rnum, TCGv_i64 val)
> #endif
> }
>
> -static inline void gen_log_pred_write(int pnum, TCGv val)
> +void gen_log_pred_write(int pnum, TCGv val)
> {
> TCGv zero = tcg_const_tl(0);
> TCGv base_val = tcg_temp_new();
> diff --git a/target/hexagon/genptr.h b/target/hexagon/genptr.h
> index c158005d2a..0bfa99b463 100644
> --- a/target/hexagon/genptr.h
> +++ b/target/hexagon/genptr.h
> @@ -19,7 +19,14 @@
> #define HEXAGON_GENPTR_H
>
> #include "insn.h"
> +#include "tcg/tcg.h"
> +#include "translate.h"
>
> extern const SemanticInsn opcode_genptr[];
>
> +TCGv gen_read_reg(TCGv result, int num);
> +TCGv gen_read_preg(TCGv pred, uint8_t num);
> +void gen_log_reg_write(int rnum, TCGv val);
> +void gen_log_pred_write(int pnum, TCGv val);
> +
> #endif
>
- [RFC PATCH 00/10] target/hexagon: introduce idef-parser, Alessandro Di Federico, 2021/02/11
- [RFC PATCH 01/10] target/hexagon: update MAINTAINERS for idef-parser, Alessandro Di Federico, 2021/02/11
- [RFC PATCH 09/10] target/hexagon: call idef-parser functions, Alessandro Di Federico, 2021/02/11
- [RFC PATCH 06/10] target/hexagon: prepare input for the idef-parser, Alessandro Di Federico, 2021/02/11
- [RFC PATCH 02/10] target/hexagon: import README for idef-parser, Alessandro Di Federico, 2021/02/11
- [RFC PATCH 07/10] target/hexagon: import lexer for idef-parser, Alessandro Di Federico, 2021/02/11
- [RFC PATCH 03/10] target/hexagon: make helper functions non-static, Alessandro Di Federico, 2021/02/11
- Re: [RFC PATCH 03/10] target/hexagon: make helper functions non-static,
Philippe Mathieu-Daudé <=
- [RFC PATCH 04/10] target/hexagon: introduce new helper functions, Alessandro Di Federico, 2021/02/11
- [RFC PATCH 08/10] target/hexagon: import parser for idef-parser, Alessandro Di Federico, 2021/02/11
- [RFC PATCH 10/10] target/hexagon: import additional tests, Alessandro Di Federico, 2021/02/11
- [RFC PATCH 05/10] target/hexagon: expose next PC in DisasContext, Alessandro Di Federico, 2021/02/11
- Re: [RFC PATCH 00/10] target/hexagon: introduce idef-parser, Richard Henderson, 2021/02/14