2009-10-12 11:31:55 +02:00
|
|
|
; RUN: llc -march=msp430 < %s | FileCheck %s
|
2009-10-12 01:03:28 +02:00
|
|
|
target datalayout = "e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8"
|
|
|
|
target triple = "msp430-generic-generic"
|
|
|
|
|
|
|
|
@foo = common global i8 0, align 1
|
|
|
|
@bar = common global i8 0, align 1
|
|
|
|
|
2009-10-12 01:03:53 +02:00
|
|
|
define void @mov() nounwind {
|
2013-07-14 08:24:09 +02:00
|
|
|
; CHECK-LABEL: mov:
|
2009-10-12 01:03:53 +02:00
|
|
|
; CHECK: mov.b &bar, &foo
|
|
|
|
%1 = load i8* @bar
|
|
|
|
store i8 %1, i8* @foo
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2009-10-12 01:03:28 +02:00
|
|
|
define void @add() nounwind {
|
2013-07-14 08:24:09 +02:00
|
|
|
; CHECK-LABEL: add:
|
2009-10-12 01:03:28 +02:00
|
|
|
; CHECK: add.b &bar, &foo
|
|
|
|
%1 = load i8* @bar
|
|
|
|
%2 = load i8* @foo
|
|
|
|
%3 = add i8 %2, %1
|
|
|
|
store i8 %3, i8* @foo
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @and() nounwind {
|
2013-07-14 08:24:09 +02:00
|
|
|
; CHECK-LABEL: and:
|
2009-10-12 01:03:28 +02:00
|
|
|
; CHECK: and.b &bar, &foo
|
|
|
|
%1 = load i8* @bar
|
|
|
|
%2 = load i8* @foo
|
|
|
|
%3 = and i8 %2, %1
|
|
|
|
store i8 %3, i8* @foo
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @bis() nounwind {
|
2013-07-14 08:24:09 +02:00
|
|
|
; CHECK-LABEL: bis:
|
2009-10-12 01:03:28 +02:00
|
|
|
; CHECK: bis.b &bar, &foo
|
|
|
|
%1 = load i8* @bar
|
|
|
|
%2 = load i8* @foo
|
|
|
|
%3 = or i8 %2, %1
|
|
|
|
store i8 %3, i8* @foo
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @xor() nounwind {
|
2013-07-14 08:24:09 +02:00
|
|
|
; CHECK-LABEL: xor:
|
2009-10-12 01:03:28 +02:00
|
|
|
; CHECK: xor.b &bar, &foo
|
|
|
|
%1 = load i8* @bar
|
|
|
|
%2 = load i8* @foo
|
|
|
|
%3 = xor i8 %2, %1
|
|
|
|
store i8 %3, i8* @foo
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|