diff options
| author | 2023-06-10 14:22:03 +0200 | |
|---|---|---|
| committer | 2023-06-10 14:22:03 +0200 | |
| commit | 5ac04c7a3ec11d939a3773876b6924e1ae39f1a5 (patch) | |
| tree | 28712d39b25ee80bc971cced1d2cba8387694412 /amd64/all.h | |
| parent | 22e20cf906fa3904eedfe34efc58a7b56116ce42 (diff) | |
isel skeleton
Diffstat (limited to 'amd64/all.h')
| -rw-r--r-- | amd64/all.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/amd64/all.h b/amd64/all.h index b8bb699..3b08761 100644 --- a/amd64/all.h +++ b/amd64/all.h @@ -12,6 +12,21 @@ enum reg { #undef R }; +static inline void +wr32le(uchar *p, uint x) +{ + p[0] = x >> 0; p[1] = x >> 8; + p[2] = x >> 16; p[3] = x >> 24; +} + +static inline void +wr64le(uchar *p, uvlong x) +{ + wr32le(p+0, x>>00); + wr32le(p+4, x>>32); +} + +void amd64_isel(struct function *); void amd64_emit(struct function *); /* vim:set ts=3 sw=3 expandtab: */ |