-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
15 changed files
with
190 additions
and
39 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
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,5 @@ | ||
// | ||
// Created by 甘尧 on 2023/12/13. | ||
// | ||
|
||
#include "jit_context.h" |
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 @@ | ||
// | ||
// Created by 甘尧 on 2023/12/13. | ||
// | ||
|
||
#ifndef SWIFTVM_JIT_CONTEXT_H | ||
#define SWIFTVM_JIT_CONTEXT_H | ||
|
||
#endif // SWIFTVM_JIT_CONTEXT_H |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
add_library(riscv64_asm STATIC assembler_riscv64.cc | ||
assembler_riscv64.h) | ||
target_include_directories(riscv64_asm PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) | ||
target_include_directories(riscv64_asm PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
add_executable(riscv64_test main.cpp) | ||
target_link_libraries(riscv64_test PRIVATE riscv64_asm) |
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,19 @@ | ||
// | ||
// Created by 甘尧 on 2023/12/8. | ||
// | ||
|
||
#include "assembler_riscv64.h" | ||
|
||
int main (int argc, char * argv[]) { | ||
using namespace swift; | ||
riscv64::Riscv64Label label{}; | ||
riscv64::ArenaAllocator allocator{}; | ||
riscv64::Riscv64Assembler assembler{&allocator}; | ||
assembler.Add(riscv64::A1, riscv64::A1, riscv64::A1); | ||
assembler.Bind(&label); | ||
assembler.Add(riscv64::A1, riscv64::A1, riscv64::A1); | ||
assembler.Add(riscv64::A1, riscv64::A1, riscv64::A1); | ||
assembler.Bne(riscv64::A1, riscv64::A2, &label); | ||
assembler.FinalizeCode(); | ||
return 0; | ||
} |
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.