[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v39 05/22] target/avr: Add instruction translation - Arithmet
From: |
Aleksandar Markovic |
Subject: |
Re: [PATCH v39 05/22] target/avr: Add instruction translation - Arithmetic and Logic Instructions |
Date: |
Sun, 22 Dec 2019 16:41:04 +0100 |
On Wednesday, December 18, 2019, Michael Rolnik <address@hidden> wrote:
This includes:
- ADD, ADC, ADIW
- SBIW, SUB, SUBI, SBC, SBCI
- AND, ANDI
- OR, ORI, EOR
- COM, NEG
- INC, DEC
- MUL, MULS, MULSU
- FMUL, FMULS, FMULSU
- DES
...
+
+/*
+ * Performs the logical AND between the contents of register Rd and register
+ * Rr and places the result in the destination register Rd.
+ */
+static bool trans_AND(DisasContext *ctx, arg_AND *a)
+{
+ TCGv Rd = cpu_r[a->rd];
+ TCGv Rr = cpu_r[a->rr];
+ TCGv R = tcg_temp_new_i32();
+
+ tcg_gen_and_tl(R, Rd, Rr); /* Rd = Rd and Rr */
+ tcg_gen_movi_tl(cpu_Vf, 0); /* Vf = 0 */
Hi, Michael.
Please add before this line a blank line and a comment:
/* update status register */
This is needed to visually separate core functionality and updating status register in trans_AND() function.
And please repeat that for all instructions that update status register.
Regards,
Aleksandar
- [PATCH v39 22/22] target/avr: Update MAINTAINERS file, (continued)
- [PATCH v39 22/22] target/avr: Update MAINTAINERS file, Michael Rolnik, 2019/12/18
- [PATCH v39 01/22] target/avr: Add outward facing interfaces and core CPU logic, Michael Rolnik, 2019/12/18
- [PATCH v39 02/22] target/avr: Add instruction helpers, Michael Rolnik, 2019/12/18
- [PATCH v39 04/22] target/avr: Add instruction translation - Registers definition, Michael Rolnik, 2019/12/18
- [PATCH v39 05/22] target/avr: Add instruction translation - Arithmetic and Logic Instructions, Michael Rolnik, 2019/12/18
- Re: [PATCH v39 05/22] target/avr: Add instruction translation - Arithmetic and Logic Instructions,
Aleksandar Markovic <=
- [PATCH v39 03/22] target/avr: Add instruction decoding, Michael Rolnik, 2019/12/18
- Re: [PATCH v39 03/22] target/avr: Add instruction decoding, Aleksandar Markovic, 2019/12/21
- Re: [PATCH v39 03/22] target/avr: Add instruction decoding, Michael Rolnik, 2019/12/21
- Re: [PATCH v39 03/22] target/avr: Add instruction decoding, Aleksandar Markovic, 2019/12/21
- Re: [PATCH v39 03/22] target/avr: Add instruction decoding, Aleksandar Markovic, 2019/12/21
- Re: [PATCH v39 03/22] target/avr: Add instruction decoding, Michael Rolnik, 2019/12/28
- Re: [PATCH v39 03/22] target/avr: Add instruction decoding, Aleksandar Markovic, 2019/12/29
Re: [PATCH v39 00/22] QEMU AVR 8 bit cores, Aleksandar Markovic, 2019/12/23