-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jiaan Lu <[email protected]>
- Loading branch information
Showing
41 changed files
with
708 additions
and
628 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// SPDX-License-Identifier: GPL-2.0-only | ||
/* | ||
/* | ||
* | ||
* Copyright (c) 2024 Intel Corporation. | ||
* Jiaxi Chen <[email protected]> | ||
|
@@ -10,18 +10,20 @@ | |
#include <stdio.h> | ||
#include <limits.h> | ||
#include "cmpxadd.c" | ||
void main() { | ||
unsigned long uop1, uop2, uop3; | ||
long op1, op2, op3; | ||
struct OutputUnsigned output; | ||
uop1 = 2; | ||
uop2 = 1; | ||
uop3 = 3; | ||
output = cmp_be_add(uop1, uop2, uop3); | ||
printf("cmp_be_add - target: *(rax) = 2, rbx = 2, rcx = 3, rflags = 0x202\n"); | ||
if (output.rax == 2 && output.rbx == 2 && output.rcx == 3 && output.rflags == 0x202) { | ||
printf("Test passed\n"); | ||
} else { | ||
printf("Test failed\n"); | ||
} | ||
} | ||
void main(void) | ||
{ | ||
unsigned long uop1, uop2, uop3; | ||
long op1, op2, op3; | ||
struct OutputUnsigned output; | ||
|
||
uop1 = 2; | ||
uop2 = 1; | ||
uop3 = 3; | ||
output = cmp_be_add(uop1, uop2, uop3); | ||
printf("cmp_be_add - target: *(rax) = 2, rbx = 2, rcx = 3, rflags = 0x202\n"); | ||
if (output.rax == 2 && output.rbx == 2 && output.rcx == 3 && output.rflags == 0x202) { | ||
printf("Test passed\n"); | ||
} else { | ||
printf("Test failed\n"); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// SPDX-License-Identifier: GPL-2.0-only | ||
/* | ||
/* | ||
* | ||
* Copyright (c) 2024 Intel Corporation. | ||
* Jiaxi Chen <[email protected]> | ||
|
@@ -10,18 +10,20 @@ | |
#include <stdio.h> | ||
#include <limits.h> | ||
#include "cmpxadd.c" | ||
void main() { | ||
unsigned long uop1, uop2, uop3; | ||
long op1, op2, op3; | ||
struct OutputUnsigned output; | ||
uop1 = 1; | ||
uop2 = 2; | ||
uop3 = 3; | ||
output = cmp_be_add(uop1, uop2, uop3); | ||
printf("cmp_be_add - target: *(rax) = 4, rbx = 1, rcx = 3, rflags = 0x297\n"); | ||
if (output.rax == 4 && output.rbx == 1 && output.rcx == 3 && output.rflags == 0x297) { | ||
printf("Test passed\n"); | ||
} else { | ||
printf("Test failed\n"); | ||
} | ||
} | ||
void main(void) | ||
{ | ||
unsigned long uop1, uop2, uop3; | ||
long op1, op2, op3; | ||
struct OutputUnsigned output; | ||
|
||
uop1 = 1; | ||
uop2 = 2; | ||
uop3 = 3; | ||
output = cmp_be_add(uop1, uop2, uop3); | ||
printf("cmp_be_add - target: *(rax) = 4, rbx = 1, rcx = 3, rflags = 0x297\n"); | ||
if (output.rax == 4 && output.rbx == 1 && output.rcx == 3 && output.rflags == 0x297) { | ||
printf("Test passed\n"); | ||
} else { | ||
printf("Test failed\n"); | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.