mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
The Octeon cpu from Cavium Networks is mips64r2 based and has an extended instruction set. In order to utilize this with LLVM, a new cpu feature "octeon" and a subtarget feature "cnmips" is added. A small set of new instructions (baddu, dmul, pop, dpop, seq, sne) is also added. LLVM generates dmul, pop and dpop instructions with option -mcpu=octeon or -mattr=+cnmips. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204337 91177308-0d34-0410-b5e6-96231b3b80d8
16 lines
391 B
LLVM
16 lines
391 B
LLVM
; RUN: llc -O1 < %s -march=mips64 -mcpu=octeon | FileCheck %s -check-prefix=OCTEON
|
|
; RUN: llc -O1 < %s -march=mips64 -mcpu=mips64 | FileCheck %s -check-prefix=MIPS64
|
|
|
|
define i64 @mul(i64 %a, i64 %b) nounwind {
|
|
entry:
|
|
; OCTEON-LABEL: mul:
|
|
; OCTEON: jr $ra
|
|
; OCTEON: dmul $2, $4, $5
|
|
; MIPS64-LABEL: mul:
|
|
; MIPS64: dmult
|
|
; MIPS64: jr
|
|
; MIPS64: mflo
|
|
%res = mul i64 %a, %b
|
|
ret i64 %res
|
|
}
|