[英]Arm64- why all filled with 1 the lower 32bit? Isn't it should be only 1 value?
mov x0, #1000
mov w6, #-1
add x7,x0,x6, sxtw
what will be the value of x6 and x7? x6 和 x7 的值是多少? [In hex] Here ans x6=0xffffffff //why all value of lower half filled with 1?
[十六进制] 这里 ans x6=0xffffffff //为什么下半部分的所有值都用 1 填充? and how sxtw work when the ans will be 999 in decimal.
以及当 ans 为十进制 999 时 sxtw 的工作方式。 I want to know details how this happening.
我想详细了解这是如何发生的。
// 1= 000000000000000000000001 (On 32bit)
// -1= 111111111111111111111111
// So -1 in hex = 0xffffffff
The lower half of x6 will be filled with above value. x6 的下半部分将被上述值填充。
On 3rd statement it sign extends the value to 64bit so -1 is correct then it add 1000+(-1) and become value 999在第三条语句中,它符号将值扩展到 64 位,因此 -1 是正确的,然后它添加 1000+(-1) 并变为值 999
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.