首页 > 试题广场 >

—个具有通用结构的C函数如下: long rfun(uns

[问答题]

—个具有通用结构的C函数如下:

long rfun(unsigned long x) {
  if ()
    return () ;
  unsigned long nx =();
  long rv = rfun(nx); 
  return  ()  ;
}
GCC产生如下汇编代码:
rfun:
  pushq  %rbx
  movq  %rdi,%rbx
  movl   $0,%eax
  testq   %rdi,%rdi
  je  .L2
  shrq  $2,%rdi
   call rfun
   addq  %rbx,%rax
.L2:
   popq  %rbx
   ret
A.rfun存储在被调用者保存寄存器%rbx中的值是什么?
B.填写上述C代码中缺失的表达式

这道题你会答吗?花几分钟告诉大家答案吧!