From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1Gol-0002RE-Jd for qemu-devel@nongnu.org; Wed, 17 Dec 2014 10:47:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y1Gog-0000VI-NA for qemu-devel@nongnu.org; Wed, 17 Dec 2014 10:47:15 -0500 Received: from mail-qc0-x22f.google.com ([2607:f8b0:400d:c01::22f]:45834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y1Gog-0000VE-Iq for qemu-devel@nongnu.org; Wed, 17 Dec 2014 10:47:10 -0500 Received: by mail-qc0-f175.google.com with SMTP id b13so13614399qcw.34 for ; Wed, 17 Dec 2014 07:47:10 -0800 (PST) Sender: Richard Henderson Message-ID: <5491A57A.20707@twiddle.net> Date: Wed, 17 Dec 2014 09:47:06 -0600 From: Richard Henderson MIME-Version: 1.0 References: <1418831961-27658-1-git-send-email-kbastian@mail.uni-paderborn.de> <1418831961-27658-3-git-send-email-kbastian@mail.uni-paderborn.de> In-Reply-To: <1418831961-27658-3-git-send-email-kbastian@mail.uni-paderborn.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 2/8] target-tricore: Add instructions of RR opcode format, that have 0xb as the first opcode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bastian Koppelmann , qemu-devel@nongnu.org On 12/17/2014 09:59 AM, Bastian Koppelmann wrote: > Add instructions of RR opcode format, that have 0xb as the first opcode. > Add helper functions, for hword and byte arithmetics: > * add_h_ssov/suov: Add two halfword and saturate on overflow. > * sub_h_ssov/suov: Sub two halfword and saturate on overflow. > * absdif_h_ssov: Compute absolute difference for halfwords and saturate on overflow. > * abs_h_ssov/suov: Compute absolute value for two halfwords and saturate on overflow. > * abs_b/h: Compute absolute value for four/two bytes/halfwords > * absdif_b/h: Compute absolute difference for four/two bytes/halfwords > * add_b/h: Add four/two bytes/halfwords. > * sub_b/h: Sub four/two bytes/halfwords. > * eq_b/h: Compare four/two bytes/halfwords with four/two bytes/halfwords on > equality and set all bits of to either one ore zero. > * eqany_b/h: Compare four/two bytes/halfwords with four/two bytes/halfwords on equality. > * lt_b/bu/h/hu: Compare four/two bytes/halfwords with four/two bytes/halfwords > on less than signed and unsigned. > * max_b/bu/h/hu: Calculate max for four/two bytes/halfwords signed and unsigned. > * min_b/bu/h/hu: Calculate min for four/two bytes/halfwords signed and unsigned. > Add helper function abs_ssov, that computes the absolute value for a 32 bit integer and saturates on overflow. > Add microcode generator functions: > * gen_sub_CC: Caluclates sub and sets the carry bit. > * gen_subc_CC: Caluclates sub and carry and sets the carry bit > * gen_abs: Compute absolute value for a 32 bit integer. > * gen_cond_w: Compares two 32 bit values on cond and sets result either zero or all bits one. > > OPC2_32_RR_MIN switched with OPC2_32_RR_MIN_U. > > Signed-off-by: Bastian Koppelmann > --- > v1 -> v2: > - gen_cond_w now uses neg and saves a temp. > - SSOV16/SUOV16 are now regular functions. > - Use TCG_CALL_NO_RWG_SE for all helpers not using globals. Reviewed-by: Richard Henderson r~