diff options
| author | Michael Matz <matz@suse.de> | 2016-06-27 20:21:57 +0200 |
|---|---|---|
| committer | Michael Matz <matz@suse.de> | 2016-12-15 17:47:06 +0100 |
| commit | d5d881d9e946351f00cbc851b965f62553f6e830 (patch) | |
| tree | 023b5e7e7b7471b11a17d1dae727793307991c4e /tests | |
| parent | 8531de319a6e3ee6a8a5424657af853767426364 (diff) | |
| download | tinycc-d5d881d9e946351f00cbc851b965f62553f6e830.tar.gz tinycc-d5d881d9e946351f00cbc851b965f62553f6e830.tar.bz2 | |
x86-asm: Accept 'q' modifier
In inline extended asm '%q1' refers to the 64bit register of operand 1.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/tcctest.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/tcctest.c b/tests/tcctest.c index 5851fb4..7fd8171 100644 --- a/tests/tcctest.c +++ b/tests/tcctest.c @@ -2584,6 +2584,17 @@ unsigned long mconstraint_test(struct struct1231 *r) return ret + a[0]; } +#ifdef __x86_64__ +int fls64(unsigned long long x) +{ + int bitpos = -1; + asm("bsrq %1,%q0" + : "+r" (bitpos) + : "rm" (x)); + return bitpos + 1; +} +#endif + unsigned int set; void asm_test(void) |
