Unverified Commit a253b7fa authored by Leoncoci's avatar Leoncoci Committed by GitHub
Browse files

test:test for Cparser

No related merge requests found
Showing with 12 additions and 4 deletions
+12 -4
...@@ -43,12 +43,20 @@ typedef struct rdtime ...@@ -43,12 +43,20 @@ typedef struct rdtime
} __rdtime_t; } __rdtime_t;
extern inline int builtin_loongarch_rdtime_d (void) #ifdef __loongarch64
extern drdtime_t
//__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
__builtin_loongarch_rdtime_d(void)
{ {
int a; drdtime_t drdtime;
return a; __asm__ volatile (
"rdtime.d\t%[val],%[tid]\n\t"
: [val]"=&r"(drdtime.dvalue),[tid]"=&r"(drdtime.dtimeid)
:);
return drdtime;
} }
#define __rdtime_d builtin_loongarch_rdtime_d #define __rdtime_d __builtin_loongarch_rdtime_d
#endif
extern inline __rdtime_t extern inline __rdtime_t
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment