[mips] Enable arithmetic and binary operations for the i128 data type.

Summary:
This patch adds support for some operations that were missing from
128-bit integer types (add/sub/mul/sdiv/udiv... etc.). With these
changes we can support the __int128_t and __uint128_t data types
from C/C++.

Depends on D7125

Reviewers: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D7143

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227089 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Vasileios Kalintiris
2015-01-26 12:33:22 +00:00
parent 71ec66e7fd
commit 536bce219d
17 changed files with 450 additions and 46 deletions

View File

@@ -73,3 +73,23 @@ entry:
%r = or i64 %a, %b
ret i64 %r
}
define signext i128 @or_i128(i128 signext %a, i128 signext %b) {
entry:
; ALL-LABEL: or_i128:
; GP32: lw $[[T0:[0-9]+]], 24($sp)
; GP32: lw $[[T1:[0-9]+]], 20($sp)
; GP32: lw $[[T2:[0-9]+]], 16($sp)
; GP32: or $2, $4, $[[T2]]
; GP32: or $3, $5, $[[T1]]
; GP32: or $4, $6, $[[T0]]
; GP32: lw $[[T3:[0-9]+]], 28($sp)
; GP32: or $5, $7, $[[T3]]
; GP64: or $2, $4, $6
; GP64: or $3, $5, $7
%r = or i128 %a, %b
ret i128 %r
}