[update] os

This commit is contained in:
bLueriVerLHR
2023-06-26 09:56:22 +08:00
parent 75644e4920
commit c931384e30
10 changed files with 125 additions and 31 deletions

View File

@@ -1,8 +1,16 @@
#include "asm.h"
#include "defs.h"
#include "latype.h"
#include "macro.h"
#ifndef __loongarch32r
#define __loongarch32r
#endif
#include "larchintrin.h"
#ifndef LA32R_H__
#define LA32R_H__
@@ -56,18 +64,10 @@ static inline uint r_ra() {
// mem misc
//
static inline void dbar() {
asm volatile("dbar 0");
}
static inline void ibar() {
asm volatile("ibar 0");
}
// need to be tested
static inline void synchronize() {
dbar();
ibar();
__dbar(0);
__ibar(0);
}
@@ -101,4 +101,6 @@ static inline uint scw(uint wdata, intptr_t addr) {
return recv;
}
#endif