mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
cmsfs-fuse: ASAN fix dec_to_hex() and hex_to_dec()
This fixes the following compiler errors when ASAN is enabled: CC cmsfs-fuse/cmsfs-fuse.o cmsfs-fuse.c: Assembler messages: cmsfs-fuse.c:310: Error: operand out of range (0xffffffffffffff00 is not between 0x0000000000000000 and 0x0000000000000fff) cmsfs-fuse.c:310: Error: operand out of range (0xffffffffffffff00 is not between 0x0000000000000000 and 0x0000000000000fff) cmsfs-fuse.c:310: Error: operand out of range (0xffffffffffffff00 is not between 0x0000000000000000 and 0x0000000000000fff) cmsfs-fuse.c:310: Error: operand out of range (0xffffffffffffff00 is not between 0x0000000000000000 and 0x0000000000000fff) cmsfs-fuse.c:310: Error: operand out of range (0xffffffffffffff00 is not between 0x0000000000000000 and 0x0000000000000fff) cmsfs-fuse.c:310: Error: operand out of range (0xffffffffffffff00 is not between 0x0000000000000000 and 0x0000000000000fff) cmsfs-fuse.c:302: Error: operand out of range (0xfffffffffffffda0 is not between 0x0000000000000000 and 0x0000000000000fff) cmsfs-fuse.c:302: Error: operand out of range (0xfffffffffffffda0 is not between 0x0000000000000000 and 0x0000000000000fff) cmsfs-fuse.c:302: Error: operand out of range (0xfffffffffffffda0 is not between 0x0000000000000000 and 0x0000000000000fff) cmsfs-fuse.c:302: Error: operand out of range (0xfffffffffffffda0 is not between 0x0000000000000000 and 0x0000000000000fff) cmsfs-fuse.c:302: Error: operand out of range (0xfffffffffffffda0 is not between 0x0000000000000000 and 0x0000000000000fff) Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com> Reviewed-by: Philipp Rudo <prudo@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
c4546daf34
commit
13016ebc5a
@@ -299,7 +299,7 @@ static unsigned long dec_to_hex(unsigned long long num)
|
||||
{
|
||||
unsigned long res;
|
||||
|
||||
asm volatile("cvb %0,%1" : "=d" (res) : "m" (num));
|
||||
asm volatile("cvb %0,%1" : "=d" (res) : "Q" (num));
|
||||
return res & 0xffffffff;
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ static unsigned int hex_to_dec(unsigned int num)
|
||||
{
|
||||
unsigned long long res;
|
||||
|
||||
asm volatile("cvd %1,%0" : "=m" (res) : "d" (num));
|
||||
asm volatile("cvd %1,%0" : "=Q" (res) : "d" (num));
|
||||
return res & 0xffffffff;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user