-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
38fd1d4
commit c74aa02
Showing
7 changed files
with
81 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// UNSUPPORTED: clz | ||
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --mcpu=%mcpu% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s | ||
|
||
#include "cmsis_compiler.h" | ||
|
||
static volatile uint32_t a = 10u; | ||
|
||
void clz() { | ||
// CHECK-LABEL: <clz>: | ||
// CHECK: cmp [[REG1:r[0-9]+]], #0x0 | ||
// CHECK: beq | ||
// CHECK: lsrs [[REG2:r[0-9]+]], [[REG1]], #0x1 | ||
// CHECK: orrs [[REG2]], [[REG1]] | ||
// CHECK: lsrs [[REG1]], [[REG2]], #0x2 | ||
volatile uint32_t c = __CLZ(a); | ||
// CHECK: {{(bx lr)|(pop {.*pc})}} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// REQUIRES: sat | ||
// RUN: %cc% %ccflags% %ccout% %s.o %s; llvm-objdump --mcpu=%mcpu% -d %s.o | FileCheck --allow-unused-prefixes --check-prefixes %prefixes% %s | ||
|
||
#include "cmsis_compiler.h" | ||
|
||
static volatile uint32_t s32 = 10; | ||
static volatile uint32_t u32 = 10U; | ||
|
||
void ssat() { | ||
// CHECK-LABEL: <ssat>: | ||
// CHECK: ssat {{r[0-9]+}}, #0x2, {{r[0-9]+}} | ||
volatile uint32_t c = __SSAT(s32, 2u); | ||
// CHECK: ssat {{r[0-9]+}}, #0x5, {{r[0-9]+}} | ||
volatile uint32_t d = __SSAT(s32, 5u); | ||
// CHECK: {{(bx lr)|(pop {.*pc})}} | ||
} | ||
|
||
void usat() { | ||
// CHECK-LABEL: <usat>: | ||
// CHECK: usat {{r[0-9]+}}, #0x2, {{r[0-9]+}} | ||
volatile uint32_t c = __USAT(u32, 2u); | ||
// CHECK: usat {{r[0-9]+}}, #0x5, {{r[0-9]+}} | ||
volatile uint32_t d = __USAT(u32, 5u); | ||
// CHECK: {{(bx lr)|(pop {.*pc})}} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.