qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v6 09/12] target/hexagon: import parser for idef-parser


From: Anton Johansson
Subject: Re: [PATCH v6 09/12] target/hexagon: import parser for idef-parser
Date: Mon, 18 Oct 2021 11:42:21 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0

On 9/7/21 18:08, Taylor Simpson wrote:

+HexValue gen_round(Context *c,
+                   YYLTYPE *locp,
+                   HexValue *source,
+                   HexValue *position) {
+    yyassert(c, locp, source->bit_width <= 32,
+             "fRNDN not implemented for bit widths > 32!");
+
+    HexValue src = ""
+    HexValue pos = *position;
+
+    HexValue src_width = gen_imm_value(c, locp, src.bit_width, 32);
+    HexValue dst_width = gen_imm_value(c, locp, 64, 32);
+    HexValue a = gen_extend_op(c, locp, &src_width, &dst_width, &src,
SIGNED);
Are you sure extending is the right thing to do here?

I believe so, the fRNDN definition in macros.h also extends here

  #define fRNDN(A, N) ((((N) == 0) ? (A) : (((fSE32_64(A)) + (1 << ((N) - 1))))))

-- 
Anton Johansson,
rev.ng Srls.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]