c - Incoming array values into local registers? -
if have looks this:
void func (unsigned long arr[]) { }
in assembly, how values in arr[0] , arr[1] local registers , pass arr out?
this tried:
func: save %sp, -(92 + 8) & -8, %sp ! save 8 bytes st %i0, [%fp-8] sll %g0, 2, %l0 add %l0, -8, %l0 ld [%fp+%l0], %l0 ! value of arr[0] should in %l0 .......... ! similar load arr[1] ld [%fp-8], %i0
this didn't work. can tell me i'm doing wrong?
Comments
Post a Comment