From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36856) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c46PI-0001mL-Uu for qemu-devel@nongnu.org; Tue, 08 Nov 2016 08:25:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c46PE-0007dL-Ve for qemu-devel@nongnu.org; Tue, 08 Nov 2016 08:25:44 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:64429) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c46PE-0007ce-Lb for qemu-devel@nongnu.org; Tue, 08 Nov 2016 08:25:40 -0500 From: Laurent Vivier Date: Tue, 8 Nov 2016 14:25:26 +0100 Message-Id: <1478611528-24643-1-git-send-email-laurent@vivier.eu> Subject: [Qemu-devel] [PATCH v4 0/2] target-m68k: add movem, BCD and CAS instructions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: schwab@linux-m68k.org, agraf@suse.de, Richard Henderson , gerg@uclinux.org, Laurent Vivier This series is another subset of the series I sent in May: https://lists.gnu.org/archive/html/qemu-devel/2016-05/msg00501.html This subset contains reworked patches for: - abcd/nbcd/sbcd: remove inline, delay write back to memory and use only 3 digits (and extract it from the bifield patch as it was squashed into it) - movem: delay the update of the registers to the end of the load sequence to be able to restart the operation in case of page fault, and manage the 68020+ <-> 68000/68010 special case - cas/cas2: rewrite according Richard's comments, and use cmpxchg() in cas. I've checked it doesn't break coldfire support: http://wiki.qemu.org/download/coldfire-test-0.1.tar.bz2 but it can't boot a 680x0 processor kernel. v4: - bcd: simplify bcd_flags - cas: use cpu_ldX_data_ra()/cpu_stX_data_ra() helper_atomic_cmpxchgq_be() fix address of second cmpxchgq() (use a2 instead of a1) manage invalid size in opcode_table v3: - This series must be applied on top of m68k-for-2.9 branch - remove movem as it has been applied from another series - bcd: use less bits, use 8bit immediate - cas2: use CC_OP_CMPW in cas2w, check CONFIG_ATOMIC64, call HELPER(cas2l) from INSN(cas2l) v2: - movem: don't use temp variable mask2 - bcd: delay register write back fix bcd_add() to add X define bcd_sub() instead of bsd_neg() - cas2: make it atomic with "parallel_cpus" and cpu_loop_exit_atomic() (and 64bit cmpxchg() if possible) Thanks, Laurent Laurent Vivier (2): target-m68k: add abcd/sbcd/nbcd target-m68k: add cas/cas2 ops target-m68k/helper.h | 2 + target-m68k/op_helper.c | 109 ++++++++++++++ target-m68k/translate.c | 369 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 480 insertions(+) -- 2.7.4