-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #432 from Wuerfel21/W21-fix-case-spintransform
Fix Spin transform level for CASE
- Loading branch information
Showing
4 changed files
with
58 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include <stdlib.h> | ||
#define __SPIN2CPP__ | ||
#include <propeller.h> | ||
#include "test169.h" | ||
|
||
void test169::Func1(int32_t A, int32_t B) | ||
{ | ||
int32_t _tmp__0000; | ||
_tmp__0000 = abs((A % 3)); | ||
if (_tmp__0000 == 0) { | ||
goto _case__0002; | ||
} | ||
if (_tmp__0000 == 1) { | ||
goto _case__0003; | ||
} | ||
if (_tmp__0000 == 2) { | ||
goto _case__0004; | ||
} | ||
if (_tmp__0000 == (abs(B))) { | ||
goto _case__0005; | ||
} | ||
goto _endswitch_0001; | ||
_case__0002: ; | ||
_OUTA = 1; | ||
goto _endswitch_0001; | ||
_case__0003: ; | ||
_OUTA = 2; | ||
goto _endswitch_0001; | ||
_case__0004: ; | ||
_OUTA = 3; | ||
goto _endswitch_0001; | ||
_case__0005: ; | ||
_OUTA = 4; | ||
goto _endswitch_0001; | ||
_endswitch_0001: ; | ||
} | ||
|
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,12 @@ | ||
#ifndef test169_Class_Defined__ | ||
#define test169_Class_Defined__ | ||
|
||
#include <stdint.h> | ||
|
||
class test169 { | ||
public: | ||
static void Func1(int32_t A, int32_t B); | ||
private: | ||
}; | ||
|
||
#endif |
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,8 @@ | ||
|
||
PUB func1(a,b) | ||
|
||
case ||(a//3) | ||
0: outa := 1 | ||
1: outa := 2 | ||
2: outa := 3 | ||
||b: outa := 4 |
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