From: Markos Chandras <markos.chandras@imgtec.com> To: <linux-mips@linux-mips.org> Cc: Markos Chandras <markos.chandras@imgtec.com> Subject: [PATCH RFC 51/67] MIPS: uapi: inst: Add new BC1EQZ and BC1NEZ MIPS R6 opcodes Date: Thu, 18 Dec 2014 15:10:00 +0000 [thread overview] Message-ID: <1418915416-3196-52-git-send-email-markos.chandras@imgtec.com> (raw) In-Reply-To: <1418915416-3196-1-git-send-email-markos.chandras@imgtec.com> Add new opcodes for the BC1EQZ and BC1NEZ instructions: BC1EQZ: Branch if Cop1 (FPR) Register Bit 0 is Equal to Zero BC1NEZ: Branch if Cop1 (FPR) Register Bit 0 is Not Equal to Zero Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> --- arch/mips/include/uapi/asm/inst.h | 3 ++- arch/mips/kernel/branch.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/mips/include/uapi/asm/inst.h b/arch/mips/include/uapi/asm/inst.h index b7aa4c788983..648addfe1e1c 100644 --- a/arch/mips/include/uapi/asm/inst.h +++ b/arch/mips/include/uapi/asm/inst.h @@ -114,7 +114,8 @@ enum cop_op { cfc_op = 0x02, mfhc_op = 0x03, mtc_op = 0x04, dmtc_op = 0x05, ctc_op = 0x06, mthc_op = 0x07, - bc_op = 0x08, cop_op = 0x10, + bc_op = 0x08, bc1eqz_op = 0x09, + bc1nez_op = 0x0d, cop_op = 0x10, copm_op = 0x18 }; diff --git a/arch/mips/kernel/branch.c b/arch/mips/kernel/branch.c index ba68c005aeab..a6f7af2aa6ee 100644 --- a/arch/mips/kernel/branch.c +++ b/arch/mips/kernel/branch.c @@ -621,9 +621,11 @@ int __compute_return_epc_for_insn(struct pt_regs *regs, case bgtz_op: case bgtzl_op: - if (NO_R6EMU && insn.i_format.opcode == bgtzl_op) + if (NO_R6EMU && insn.i_format.opcode == bgtzl_op) { /* not emulating the branch likely for R6 */ + ret = -SIGILL; break; + } /* rt field assumed to be zero */ if ((long)regs->regs[insn.i_format.rs] > 0) { epc = epc + 4 + (insn.i_format.simmediate << 2); -- 2.2.0
WARNING: multiple messages have this Message-ID (diff)
From: Markos Chandras <markos.chandras@imgtec.com> To: linux-mips@linux-mips.org Cc: Markos Chandras <markos.chandras@imgtec.com> Subject: [PATCH RFC 51/67] MIPS: uapi: inst: Add new BC1EQZ and BC1NEZ MIPS R6 opcodes Date: Thu, 18 Dec 2014 15:10:00 +0000 [thread overview] Message-ID: <1418915416-3196-52-git-send-email-markos.chandras@imgtec.com> (raw) Message-ID: <20141218151000.4VXpAPHL6XwfR9trcnbyZ2hwooyrGq_RI8RTMCPvAAQ@z> (raw) In-Reply-To: <1418915416-3196-1-git-send-email-markos.chandras@imgtec.com> Add new opcodes for the BC1EQZ and BC1NEZ instructions: BC1EQZ: Branch if Cop1 (FPR) Register Bit 0 is Equal to Zero BC1NEZ: Branch if Cop1 (FPR) Register Bit 0 is Not Equal to Zero Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> --- arch/mips/include/uapi/asm/inst.h | 3 ++- arch/mips/kernel/branch.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/mips/include/uapi/asm/inst.h b/arch/mips/include/uapi/asm/inst.h index b7aa4c788983..648addfe1e1c 100644 --- a/arch/mips/include/uapi/asm/inst.h +++ b/arch/mips/include/uapi/asm/inst.h @@ -114,7 +114,8 @@ enum cop_op { cfc_op = 0x02, mfhc_op = 0x03, mtc_op = 0x04, dmtc_op = 0x05, ctc_op = 0x06, mthc_op = 0x07, - bc_op = 0x08, cop_op = 0x10, + bc_op = 0x08, bc1eqz_op = 0x09, + bc1nez_op = 0x0d, cop_op = 0x10, copm_op = 0x18 }; diff --git a/arch/mips/kernel/branch.c b/arch/mips/kernel/branch.c index ba68c005aeab..a6f7af2aa6ee 100644 --- a/arch/mips/kernel/branch.c +++ b/arch/mips/kernel/branch.c @@ -621,9 +621,11 @@ int __compute_return_epc_for_insn(struct pt_regs *regs, case bgtz_op: case bgtzl_op: - if (NO_R6EMU && insn.i_format.opcode == bgtzl_op) + if (NO_R6EMU && insn.i_format.opcode == bgtzl_op) { /* not emulating the branch likely for R6 */ + ret = -SIGILL; break; + } /* rt field assumed to be zero */ if ((long)regs->regs[insn.i_format.rs] > 0) { epc = epc + 4 + (insn.i_format.simmediate << 2); -- 2.2.0
next prev parent reply other threads:[~2014-12-18 15:25 UTC|newest] Thread overview: 187+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-12-18 15:09 [PATCH RFC 00/67] Add MIPS R6 support Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 01/67] MIPS: Add generic QEMU R6 PRid and cpu type identifiers Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 19:10 ` David Daney 2014-12-19 8:49 ` Markos Chandras 2014-12-19 8:49 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 02/67] MIPS: Add cases for CPU_QEMUR6 Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 03/67] MIPS: Add MIPS QEMUR6 probe support Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 04/67] MIPS: Add build support for the MIPS R6 ISA Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 05/67] MIPS: mm: uasm: Add signed 9-bit immediate related macros Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 06/67] MIPS: mm: Add MIPS R6 instruction encodings Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 07/67] MIPS: asm: asm: Add new macros to set ISA and arch asm annotations Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 08/67] MIPS: asm: module: define MODULE_PROC_FAMILY for MIPS R6 Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 09/67] MIPS: asm: stackframe: Do not preserve the HI/LO registers on " Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 10/67] MIPS: asm: asmmacro: Drop unused 'reg' argument on MIPSR2 Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 11/67] MIPS: asm: asmmacro: Add MIPS R6 support to the simple EI/DI variants Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 12/67] MIPS: asm: asmmacro: Replace add instructions with "addui" Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 18:56 ` David Daney 2014-12-19 9:01 ` Markos Chandras 2014-12-19 9:01 ` Markos Chandras 2015-01-11 23:34 ` Maciej W. Rozycki 2015-01-13 13:13 ` Markos Chandras 2015-01-13 13:13 ` Markos Chandras 2015-01-13 14:58 ` Maciej W. Rozycki 2015-01-13 15:04 ` Markos Chandras 2015-01-13 15:04 ` Markos Chandras 2015-01-13 15:24 ` Maciej W. Rozycki 2014-12-18 15:09 ` [PATCH RFC 13/67] MIPS: Use generic checksum functions for MIPS R6 Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 14/67] MIPS: asm: cpu: Add MIPSR6 ISA definitions Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 15/67] MIPS: asm: hazards: Add MIPSR6 definitions Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 16/67] MIPS: asm: irqflags: Add MIPS R6 related definitions Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 17/67] MIPS: asm: r4kcache: Add MIPS R6 cache unroll functions Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 18/67] MIPS: asm: spram: Add MIPS R6 related definitions Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 19/67] MIPS: asm: atomic: Update asm and ISA constrains for MIPS R6 support Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 18:50 ` David Daney 2014-12-18 18:59 ` Måns Rullgård 2014-12-18 19:01 ` Ralf Baechle 2014-12-18 21:04 ` Matthew Fortune 2014-12-18 21:04 ` Matthew Fortune 2014-12-18 22:18 ` Måns Rullgård 2014-12-18 22:18 ` Måns Rullgård 2014-12-18 22:19 ` David Daney 2014-12-18 22:58 ` Matthew Fortune 2014-12-18 23:43 ` Måns Rullgård 2014-12-18 23:43 ` Måns Rullgård 2014-12-19 10:20 ` Markos Chandras 2014-12-19 12:39 ` Markos Chandras 2014-12-19 13:53 ` Matthew Fortune 2014-12-19 13:55 ` Markos Chandras 2015-01-11 23:51 ` Maciej W. Rozycki 2014-12-19 12:29 ` Ralf Baechle 2014-12-19 10:01 ` Markos Chandras 2014-12-19 10:01 ` Markos Chandras 2014-12-19 16:38 ` David Daney 2014-12-18 15:09 ` [PATCH RFC 20/67] MIPS: asm: cmpxchg: " Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 21/67] MIPS: asm: bitops: " Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 22/67] MIPS: asm: futex: " Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 23/67] MIPS: asm: spinlock: Update asm " Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 24/67] MIPS: asm: spinlock: Replace sub instruction with addiu Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 18:53 ` David Daney 2014-12-18 19:06 ` Ralf Baechle 2014-12-19 8:51 ` Markos Chandras 2014-12-19 8:51 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 25/67] MIPS: kernel: cpu-bugs64: Do not check R6 cores for existing 64-bit bugs Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 26/67] MIPS: kernel: cevt-r4k: Add MIPS R6 to the c0_compare_interrupt handler Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 27/67] MIPS: kernel: cpu-probe.c: Add support for MIPS R6 Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 28/67] MIPS: kernel: entry.S: Add MIPS R6 related definitions Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 29/67] MIPS: kernel: proc: Add MIPS R6 support to /proc/cpuinfo Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-19 11:32 ` Sergei Shtylyov 2014-12-18 15:09 ` [PATCH RFC 30/67] MIPS: kernel: traps: Add MIPS R6 related definitions Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 31/67] MIPS: kernel: r4k_switch: Add support for MIPS R6 Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 32/67] MIPS: kernel: r4k_fpu: " Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 33/67] MIPS: kernel: genex: Set correct ISA level Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 34/67] MIPS: kernel: cps-vec: Replace addi with addiu Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 35/67] MIPS: uapi: inst: Add new opcodes for COP2 instructions Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 36/67] MIPS: kernel: unaligned: Add support for the MIPS R6 Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 37/67] MIPS: lib: memcpy: Add MIPS R6 support Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 38/67] MIPS: lib: memset: " Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 39/67] MIPS: mm: page: " Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 40/67] MIPS: mm: tlbex: Add MIPS R6 case for the EHB instruction Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 19:05 ` David Daney 2014-12-18 15:09 ` [PATCH RFC 41/67] MIPS: mm: c-r4k: Set the correct ISA level Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 42/67] MIPS: kernel: branch: Prepare the JR instruction for emulation on MIPS R6 Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 43/67] MIPS: kernel: branch: Prevent BLTZL emulation for " Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 44/67] MIPS: kernel: branch: Prevent BGEZL " Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 45/67] MIPS: kernel: branch: Prevent BLTZAL " Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 46/67] MIPS: kernel: branch: Prevent BGEZAL " Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 47/67] MIPS: kernel: branch: Prevent BEQL " Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 23:56 ` Joshua Kinard 2014-12-19 8:54 ` Markos Chandras 2014-12-19 8:54 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 48/67] MIPS: kernel: branch: Prevent BNEL " Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 49/67] MIPS: kernel: branch: Prevent BLEZL " Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:09 ` [PATCH RFC 50/67] MIPS: kernel: branch: Prevent BGTZL " Markos Chandras 2014-12-18 15:09 ` Markos Chandras 2014-12-18 15:10 ` Markos Chandras [this message] 2014-12-18 15:10 ` [PATCH RFC 51/67] MIPS: uapi: inst: Add new BC1EQZ and BC1NEZ MIPS R6 opcodes Markos Chandras 2014-12-18 15:10 ` [PATCH RFC 52/67] MIPS: kernel: branch: Add support for the BC1{EQ,NE}Z FPU branches Markos Chandras 2014-12-18 15:10 ` Markos Chandras 2014-12-18 15:10 ` [PATCH RFC 53/67] MIPS: kernel: branch: Add new MIPS R6 B{L,G}ΕZ{AL,}C emulation Markos Chandras 2014-12-18 15:10 ` Markos Chandras 2014-12-19 11:59 ` Sergei Shtylyov 2014-12-18 15:10 ` [PATCH RFC 54/67] MIPS: kernel: branch: Add new MIPS R6 B{L,G}TZ{AL,}C emulation Markos Chandras 2014-12-18 15:10 ` Markos Chandras 2014-12-19 12:02 ` Sergei Shtylyov 2014-12-18 15:10 ` [PATCH RFC 55/67] MIPS: kernel: branch: Emulate the branch compact (BC) on MIPS R6 Markos Chandras 2014-12-18 15:10 ` Markos Chandras 2014-12-18 15:10 ` [PATCH RFC 56/67] MIPS: kernel: branch: Emulate the BOVC, BEQC and BEQZALC R6 instructions Markos Chandras 2014-12-18 15:10 ` Markos Chandras 2014-12-18 19:07 ` David Daney 2014-12-19 8:52 ` Markos Chandras 2014-12-19 8:52 ` Markos Chandras 2014-12-18 15:10 ` [PATCH RFC 57/67] MIPS: kernel: branch: Emulate the BNVC, BNEC and BNEZLAC " Markos Chandras 2014-12-18 15:10 ` Markos Chandras 2014-12-18 19:08 ` David Daney 2014-12-18 15:10 ` [PATCH RFC 58/67] MIPS: kernel: branch: Emulate the BALC R6 instruction Markos Chandras 2014-12-18 15:10 ` Markos Chandras 2014-12-19 12:06 ` Sergei Shtylyov 2014-12-18 15:10 ` [PATCH RFC 59/67] MIPS: kernel: branch: Emulate the BEQZC and JIC instructions Markos Chandras 2014-12-18 15:10 ` Markos Chandras 2014-12-19 12:08 ` Sergei Shtylyov 2014-12-18 15:10 ` [PATCH RFC 60/67] MIPS: math-emu: cp1emu: Move the fpucondbit struct to a header Markos Chandras 2014-12-18 15:10 ` Markos Chandras 2014-12-19 12:10 ` Sergei Shtylyov 2014-12-18 15:10 ` [PATCH RFC 61/67] MIPS: Add LLB bit and related feature for the Config 5 CP0 register Markos Chandras 2014-12-18 15:10 ` Markos Chandras 2014-12-18 15:10 ` [PATCH RFC 62/67] MIPS: asm: mipsregs: Add support for the LLADDR register Markos Chandras 2014-12-18 15:10 ` Markos Chandras 2014-12-18 15:10 ` [PATCH RFC 63/67] MIPS: kernel: mips-r2-to-r6-emul: Add R2 emulator for MIPS R6 Markos Chandras 2014-12-18 15:10 ` Markos Chandras 2014-12-18 15:10 ` [PATCH RFC 64/67] MIPS: Make use of the ERETNC instruction on " Markos Chandras 2014-12-18 15:10 ` Markos Chandras 2014-12-18 15:10 ` [PATCH RFC 65/67] MIPS: Malta: malta-int: Set correct asm ISA level Markos Chandras 2014-12-18 15:10 ` Markos Chandras 2014-12-18 15:10 ` [PATCH RFC 66/67] MIPS: Malta: Add support for building MIPS R6 kernel Markos Chandras 2014-12-18 15:10 ` Markos Chandras 2014-12-18 15:10 ` [PATCH RFC 67/67] MIPS: Add Malta QEMU 32R6 defconfig Markos Chandras 2014-12-18 15:10 ` Markos Chandras
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1418915416-3196-52-git-send-email-markos.chandras@imgtec.com \ --to=markos.chandras@imgtec.com \ --cc=linux-mips@linux-mips.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.