backtrace.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682
  1. /*
  2. * Copyright 2010 Tilera Corporation. All Rights Reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation, version 2.
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
  11. * NON INFRINGEMENT. See the GNU General Public License for
  12. * more details.
  13. */
  14. #include <linux/kernel.h>
  15. #include <linux/string.h>
  16. #include <asm/backtrace.h>
  17. #include <arch/chip.h>
  18. #include <asm/opcode-tile.h>
  19. #define TREG_SP 54
  20. #define TREG_LR 55
  21. #if TILE_CHIP >= 10
  22. #define tile_bundle_bits tilegx_bundle_bits
  23. #define TILE_MAX_INSTRUCTIONS_PER_BUNDLE TILEGX_MAX_INSTRUCTIONS_PER_BUNDLE
  24. #define TILE_BUNDLE_ALIGNMENT_IN_BYTES TILEGX_BUNDLE_ALIGNMENT_IN_BYTES
  25. #define tile_decoded_instruction tilegx_decoded_instruction
  26. #define tile_mnemonic tilegx_mnemonic
  27. #define parse_insn_tile parse_insn_tilegx
  28. #define TILE_OPC_IRET TILEGX_OPC_IRET
  29. #define TILE_OPC_ADDI TILEGX_OPC_ADDI
  30. #define TILE_OPC_ADDLI TILEGX_OPC_ADDLI
  31. #define TILE_OPC_INFO TILEGX_OPC_INFO
  32. #define TILE_OPC_INFOL TILEGX_OPC_INFOL
  33. #define TILE_OPC_JRP TILEGX_OPC_JRP
  34. #define TILE_OPC_MOVE TILEGX_OPC_MOVE
  35. #define OPCODE_STORE TILEGX_OPC_ST
  36. typedef long long bt_int_reg_t;
  37. #else
  38. #define OPCODE_STORE TILE_OPC_SW
  39. typedef int bt_int_reg_t;
  40. #endif
  41. /** A decoded bundle used for backtracer analysis. */
  42. struct BacktraceBundle {
  43. tile_bundle_bits bits;
  44. int num_insns;
  45. struct tile_decoded_instruction
  46. insns[TILE_MAX_INSTRUCTIONS_PER_BUNDLE];
  47. };
  48. /* This implementation only makes sense for native tools. */
  49. /** Default function to read memory. */
  50. static bool bt_read_memory(void *result, VirtualAddress addr,
  51. unsigned int size, void *extra)
  52. {
  53. /* FIXME: this should do some horrible signal stuff to catch
  54. * SEGV cleanly and fail.
  55. *
  56. * Or else the caller should do the setjmp for efficiency.
  57. */
  58. memcpy(result, (const void *)addr, size);
  59. return true;
  60. }
  61. /** Locates an instruction inside the given bundle that
  62. * has the specified mnemonic, and whose first 'num_operands_to_match'
  63. * operands exactly match those in 'operand_values'.
  64. */
  65. static const struct tile_decoded_instruction *find_matching_insn(
  66. const struct BacktraceBundle *bundle,
  67. tile_mnemonic mnemonic,
  68. const int *operand_values,
  69. int num_operands_to_match)
  70. {
  71. int i, j;
  72. bool match;
  73. for (i = 0; i < bundle->num_insns; i++) {
  74. const struct tile_decoded_instruction *insn =
  75. &bundle->insns[i];
  76. if (insn->opcode->mnemonic != mnemonic)
  77. continue;
  78. match = true;
  79. for (j = 0; j < num_operands_to_match; j++) {
  80. if (operand_values[j] != insn->operand_values[j]) {
  81. match = false;
  82. break;
  83. }
  84. }
  85. if (match)
  86. return insn;
  87. }
  88. return NULL;
  89. }
  90. /** Does this bundle contain an 'iret' instruction? */
  91. static inline bool bt_has_iret(const struct BacktraceBundle *bundle)
  92. {
  93. return find_matching_insn(bundle, TILE_OPC_IRET, NULL, 0) != NULL;
  94. }
  95. /** Does this bundle contain an 'addi sp, sp, OFFSET' or
  96. * 'addli sp, sp, OFFSET' instruction, and if so, what is OFFSET?
  97. */
  98. static bool bt_has_addi_sp(const struct BacktraceBundle *bundle, int *adjust)
  99. {
  100. static const int vals[2] = { TREG_SP, TREG_SP };
  101. const struct tile_decoded_instruction *insn =
  102. find_matching_insn(bundle, TILE_OPC_ADDI, vals, 2);
  103. if (insn == NULL)
  104. insn = find_matching_insn(bundle, TILE_OPC_ADDLI, vals, 2);
  105. #if TILE_CHIP >= 10
  106. if (insn == NULL)
  107. insn = find_matching_insn(bundle, TILEGX_OPC_ADDXLI, vals, 2);
  108. if (insn == NULL)
  109. insn = find_matching_insn(bundle, TILEGX_OPC_ADDXI, vals, 2);
  110. #endif
  111. if (insn == NULL)
  112. return false;
  113. *adjust = insn->operand_values[2];
  114. return true;
  115. }
  116. /** Does this bundle contain any 'info OP' or 'infol OP'
  117. * instruction, and if so, what are their OP? Note that OP is interpreted
  118. * as an unsigned value by this code since that's what the caller wants.
  119. * Returns the number of info ops found.
  120. */
  121. static int bt_get_info_ops(const struct BacktraceBundle *bundle,
  122. int operands[MAX_INFO_OPS_PER_BUNDLE])
  123. {
  124. int num_ops = 0;
  125. int i;
  126. for (i = 0; i < bundle->num_insns; i++) {
  127. const struct tile_decoded_instruction *insn =
  128. &bundle->insns[i];
  129. if (insn->opcode->mnemonic == TILE_OPC_INFO ||
  130. insn->opcode->mnemonic == TILE_OPC_INFOL) {
  131. operands[num_ops++] = insn->operand_values[0];
  132. }
  133. }
  134. return num_ops;
  135. }
  136. /** Does this bundle contain a jrp instruction, and if so, to which
  137. * register is it jumping?
  138. */
  139. static bool bt_has_jrp(const struct BacktraceBundle *bundle, int *target_reg)
  140. {
  141. const struct tile_decoded_instruction *insn =
  142. find_matching_insn(bundle, TILE_OPC_JRP, NULL, 0);
  143. if (insn == NULL)
  144. return false;
  145. *target_reg = insn->operand_values[0];
  146. return true;
  147. }
  148. /** Does this bundle modify the specified register in any way? */
  149. static bool bt_modifies_reg(const struct BacktraceBundle *bundle, int reg)
  150. {
  151. int i, j;
  152. for (i = 0; i < bundle->num_insns; i++) {
  153. const struct tile_decoded_instruction *insn =
  154. &bundle->insns[i];
  155. if (insn->opcode->implicitly_written_register == reg)
  156. return true;
  157. for (j = 0; j < insn->opcode->num_operands; j++)
  158. if (insn->operands[j]->is_dest_reg &&
  159. insn->operand_values[j] == reg)
  160. return true;
  161. }
  162. return false;
  163. }
  164. /** Does this bundle modify sp? */
  165. static inline bool bt_modifies_sp(const struct BacktraceBundle *bundle)
  166. {
  167. return bt_modifies_reg(bundle, TREG_SP);
  168. }
  169. /** Does this bundle modify lr? */
  170. static inline bool bt_modifies_lr(const struct BacktraceBundle *bundle)
  171. {
  172. return bt_modifies_reg(bundle, TREG_LR);
  173. }
  174. /** Does this bundle contain the instruction 'move fp, sp'? */
  175. static inline bool bt_has_move_r52_sp(const struct BacktraceBundle *bundle)
  176. {
  177. static const int vals[2] = { 52, TREG_SP };
  178. return find_matching_insn(bundle, TILE_OPC_MOVE, vals, 2) != NULL;
  179. }
  180. /** Does this bundle contain a store of lr to sp? */
  181. static inline bool bt_has_sw_sp_lr(const struct BacktraceBundle *bundle)
  182. {
  183. static const int vals[2] = { TREG_SP, TREG_LR };
  184. return find_matching_insn(bundle, OPCODE_STORE, vals, 2) != NULL;
  185. }
  186. #if TILE_CHIP >= 10
  187. /** Track moveli values placed into registers. */
  188. static inline void bt_update_moveli(const struct BacktraceBundle *bundle,
  189. int moveli_args[])
  190. {
  191. int i;
  192. for (i = 0; i < bundle->num_insns; i++) {
  193. const struct tile_decoded_instruction *insn =
  194. &bundle->insns[i];
  195. if (insn->opcode->mnemonic == TILEGX_OPC_MOVELI) {
  196. int reg = insn->operand_values[0];
  197. moveli_args[reg] = insn->operand_values[1];
  198. }
  199. }
  200. }
  201. /** Does this bundle contain an 'add sp, sp, reg' instruction
  202. * from a register that we saw a moveli into, and if so, what
  203. * is the value in the register?
  204. */
  205. static bool bt_has_add_sp(const struct BacktraceBundle *bundle, int *adjust,
  206. int moveli_args[])
  207. {
  208. static const int vals[2] = { TREG_SP, TREG_SP };
  209. const struct tile_decoded_instruction *insn =
  210. find_matching_insn(bundle, TILEGX_OPC_ADDX, vals, 2);
  211. if (insn) {
  212. int reg = insn->operand_values[2];
  213. if (moveli_args[reg]) {
  214. *adjust = moveli_args[reg];
  215. return true;
  216. }
  217. }
  218. return false;
  219. }
  220. #endif
  221. /** Locates the caller's PC and SP for a program starting at the
  222. * given address.
  223. */
  224. static void find_caller_pc_and_caller_sp(CallerLocation *location,
  225. const VirtualAddress start_pc,
  226. BacktraceMemoryReader read_memory_func,
  227. void *read_memory_func_extra)
  228. {
  229. /* Have we explicitly decided what the sp is,
  230. * rather than just the default?
  231. */
  232. bool sp_determined = false;
  233. /* Has any bundle seen so far modified lr? */
  234. bool lr_modified = false;
  235. /* Have we seen a move from sp to fp? */
  236. bool sp_moved_to_r52 = false;
  237. /* Have we seen a terminating bundle? */
  238. bool seen_terminating_bundle = false;
  239. /* Cut down on round-trip reading overhead by reading several
  240. * bundles at a time.
  241. */
  242. tile_bundle_bits prefetched_bundles[32];
  243. int num_bundles_prefetched = 0;
  244. int next_bundle = 0;
  245. VirtualAddress pc;
  246. #if TILE_CHIP >= 10
  247. /* Naively try to track moveli values to support addx for -m32. */
  248. int moveli_args[TILEGX_NUM_REGISTERS] = { 0 };
  249. #endif
  250. /* Default to assuming that the caller's sp is the current sp.
  251. * This is necessary to handle the case where we start backtracing
  252. * right at the end of the epilog.
  253. */
  254. location->sp_location = SP_LOC_OFFSET;
  255. location->sp_offset = 0;
  256. /* Default to having no idea where the caller PC is. */
  257. location->pc_location = PC_LOC_UNKNOWN;
  258. /* Don't even try if the PC is not aligned. */
  259. if (start_pc % TILE_BUNDLE_ALIGNMENT_IN_BYTES != 0)
  260. return;
  261. for (pc = start_pc;; pc += sizeof(tile_bundle_bits)) {
  262. struct BacktraceBundle bundle;
  263. int num_info_ops, info_operands[MAX_INFO_OPS_PER_BUNDLE];
  264. int one_ago, jrp_reg;
  265. bool has_jrp;
  266. if (next_bundle >= num_bundles_prefetched) {
  267. /* Prefetch some bytes, but don't cross a page
  268. * boundary since that might cause a read failure we
  269. * don't care about if we only need the first few
  270. * bytes. Note: we don't care what the actual page
  271. * size is; using the minimum possible page size will
  272. * prevent any problems.
  273. */
  274. unsigned int bytes_to_prefetch = 4096 - (pc & 4095);
  275. if (bytes_to_prefetch > sizeof prefetched_bundles)
  276. bytes_to_prefetch = sizeof prefetched_bundles;
  277. if (!read_memory_func(prefetched_bundles, pc,
  278. bytes_to_prefetch,
  279. read_memory_func_extra)) {
  280. if (pc == start_pc) {
  281. /* The program probably called a bad
  282. * address, such as a NULL pointer.
  283. * So treat this as if we are at the
  284. * start of the function prolog so the
  285. * backtrace will show how we got here.
  286. */
  287. location->pc_location = PC_LOC_IN_LR;
  288. return;
  289. }
  290. /* Unreadable address. Give up. */
  291. break;
  292. }
  293. next_bundle = 0;
  294. num_bundles_prefetched =
  295. bytes_to_prefetch / sizeof(tile_bundle_bits);
  296. }
  297. /* Decode the next bundle. */
  298. bundle.bits = prefetched_bundles[next_bundle++];
  299. bundle.num_insns =
  300. parse_insn_tile(bundle.bits, pc, bundle.insns);
  301. num_info_ops = bt_get_info_ops(&bundle, info_operands);
  302. /* First look at any one_ago info ops if they are interesting,
  303. * since they should shadow any non-one-ago info ops.
  304. */
  305. for (one_ago = (pc != start_pc) ? 1 : 0;
  306. one_ago >= 0; one_ago--) {
  307. int i;
  308. for (i = 0; i < num_info_ops; i++) {
  309. int info_operand = info_operands[i];
  310. if (info_operand < CALLER_UNKNOWN_BASE) {
  311. /* Weird; reserved value, ignore it. */
  312. continue;
  313. }
  314. /* Skip info ops which are not in the
  315. * "one_ago" mode we want right now.
  316. */
  317. if (((info_operand & ONE_BUNDLE_AGO_FLAG) != 0)
  318. != (one_ago != 0))
  319. continue;
  320. /* Clear the flag to make later checking
  321. * easier. */
  322. info_operand &= ~ONE_BUNDLE_AGO_FLAG;
  323. /* Default to looking at PC_IN_LR_FLAG. */
  324. if (info_operand & PC_IN_LR_FLAG)
  325. location->pc_location =
  326. PC_LOC_IN_LR;
  327. else
  328. location->pc_location =
  329. PC_LOC_ON_STACK;
  330. switch (info_operand) {
  331. case CALLER_UNKNOWN_BASE:
  332. location->pc_location = PC_LOC_UNKNOWN;
  333. location->sp_location = SP_LOC_UNKNOWN;
  334. return;
  335. case CALLER_SP_IN_R52_BASE:
  336. case CALLER_SP_IN_R52_BASE | PC_IN_LR_FLAG:
  337. location->sp_location = SP_LOC_IN_R52;
  338. return;
  339. default:
  340. {
  341. const unsigned int val = info_operand
  342. - CALLER_SP_OFFSET_BASE;
  343. const unsigned int sp_offset =
  344. (val >> NUM_INFO_OP_FLAGS) * 8;
  345. if (sp_offset < 32768) {
  346. /* This is a properly encoded
  347. * SP offset. */
  348. location->sp_location =
  349. SP_LOC_OFFSET;
  350. location->sp_offset =
  351. sp_offset;
  352. return;
  353. } else {
  354. /* This looked like an SP
  355. * offset, but it's outside
  356. * the legal range, so this
  357. * must be an unrecognized
  358. * info operand. Ignore it.
  359. */
  360. }
  361. }
  362. break;
  363. }
  364. }
  365. }
  366. if (seen_terminating_bundle) {
  367. /* We saw a terminating bundle during the previous
  368. * iteration, so we were only looking for an info op.
  369. */
  370. break;
  371. }
  372. if (bundle.bits == 0) {
  373. /* Wacky terminating bundle. Stop looping, and hope
  374. * we've already seen enough to find the caller.
  375. */
  376. break;
  377. }
  378. /*
  379. * Try to determine caller's SP.
  380. */
  381. if (!sp_determined) {
  382. int adjust;
  383. if (bt_has_addi_sp(&bundle, &adjust)
  384. #if TILE_CHIP >= 10
  385. || bt_has_add_sp(&bundle, &adjust, moveli_args)
  386. #endif
  387. ) {
  388. location->sp_location = SP_LOC_OFFSET;
  389. if (adjust <= 0) {
  390. /* We are in prolog about to adjust
  391. * SP. */
  392. location->sp_offset = 0;
  393. } else {
  394. /* We are in epilog restoring SP. */
  395. location->sp_offset = adjust;
  396. }
  397. sp_determined = true;
  398. } else {
  399. if (bt_has_move_r52_sp(&bundle)) {
  400. /* Maybe in prolog, creating an
  401. * alloca-style frame. But maybe in
  402. * the middle of a fixed-size frame
  403. * clobbering r52 with SP.
  404. */
  405. sp_moved_to_r52 = true;
  406. }
  407. if (bt_modifies_sp(&bundle)) {
  408. if (sp_moved_to_r52) {
  409. /* We saw SP get saved into
  410. * r52 earlier (or now), which
  411. * must have been in the
  412. * prolog, so we now know that
  413. * SP is still holding the
  414. * caller's sp value.
  415. */
  416. location->sp_location =
  417. SP_LOC_OFFSET;
  418. location->sp_offset = 0;
  419. } else {
  420. /* Someone must have saved
  421. * aside the caller's SP value
  422. * into r52, so r52 holds the
  423. * current value.
  424. */
  425. location->sp_location =
  426. SP_LOC_IN_R52;
  427. }
  428. sp_determined = true;
  429. }
  430. }
  431. #if TILE_CHIP >= 10
  432. /* Track moveli arguments for -m32 mode. */
  433. bt_update_moveli(&bundle, moveli_args);
  434. #endif
  435. }
  436. if (bt_has_iret(&bundle)) {
  437. /* This is a terminating bundle. */
  438. seen_terminating_bundle = true;
  439. continue;
  440. }
  441. /*
  442. * Try to determine caller's PC.
  443. */
  444. jrp_reg = -1;
  445. has_jrp = bt_has_jrp(&bundle, &jrp_reg);
  446. if (has_jrp)
  447. seen_terminating_bundle = true;
  448. if (location->pc_location == PC_LOC_UNKNOWN) {
  449. if (has_jrp) {
  450. if (jrp_reg == TREG_LR && !lr_modified) {
  451. /* Looks like a leaf function, or else
  452. * lr is already restored. */
  453. location->pc_location =
  454. PC_LOC_IN_LR;
  455. } else {
  456. location->pc_location =
  457. PC_LOC_ON_STACK;
  458. }
  459. } else if (bt_has_sw_sp_lr(&bundle)) {
  460. /* In prolog, spilling initial lr to stack. */
  461. location->pc_location = PC_LOC_IN_LR;
  462. } else if (bt_modifies_lr(&bundle)) {
  463. lr_modified = true;
  464. }
  465. }
  466. }
  467. }
  468. void backtrace_init(BacktraceIterator *state,
  469. BacktraceMemoryReader read_memory_func,
  470. void *read_memory_func_extra,
  471. VirtualAddress pc, VirtualAddress lr,
  472. VirtualAddress sp, VirtualAddress r52)
  473. {
  474. CallerLocation location;
  475. VirtualAddress fp, initial_frame_caller_pc;
  476. if (read_memory_func == NULL) {
  477. read_memory_func = bt_read_memory;
  478. }
  479. /* Find out where we are in the initial frame. */
  480. find_caller_pc_and_caller_sp(&location, pc,
  481. read_memory_func, read_memory_func_extra);
  482. switch (location.sp_location) {
  483. case SP_LOC_UNKNOWN:
  484. /* Give up. */
  485. fp = -1;
  486. break;
  487. case SP_LOC_IN_R52:
  488. fp = r52;
  489. break;
  490. case SP_LOC_OFFSET:
  491. fp = sp + location.sp_offset;
  492. break;
  493. default:
  494. /* Give up. */
  495. fp = -1;
  496. break;
  497. }
  498. /* If the frame pointer is not aligned to the basic word size
  499. * something terrible happened and we should mark it as invalid.
  500. */
  501. if (fp % sizeof(bt_int_reg_t) != 0)
  502. fp = -1;
  503. /* -1 means "don't know initial_frame_caller_pc". */
  504. initial_frame_caller_pc = -1;
  505. switch (location.pc_location) {
  506. case PC_LOC_UNKNOWN:
  507. /* Give up. */
  508. fp = -1;
  509. break;
  510. case PC_LOC_IN_LR:
  511. if (lr == 0 || lr % TILE_BUNDLE_ALIGNMENT_IN_BYTES != 0) {
  512. /* Give up. */
  513. fp = -1;
  514. } else {
  515. initial_frame_caller_pc = lr;
  516. }
  517. break;
  518. case PC_LOC_ON_STACK:
  519. /* Leave initial_frame_caller_pc as -1,
  520. * meaning check the stack.
  521. */
  522. break;
  523. default:
  524. /* Give up. */
  525. fp = -1;
  526. break;
  527. }
  528. state->pc = pc;
  529. state->sp = sp;
  530. state->fp = fp;
  531. state->initial_frame_caller_pc = initial_frame_caller_pc;
  532. state->read_memory_func = read_memory_func;
  533. state->read_memory_func_extra = read_memory_func_extra;
  534. }
  535. /* Handle the case where the register holds more bits than the VA. */
  536. static bool valid_addr_reg(bt_int_reg_t reg)
  537. {
  538. return ((VirtualAddress)reg == reg);
  539. }
  540. bool backtrace_next(BacktraceIterator *state)
  541. {
  542. VirtualAddress next_fp, next_pc;
  543. bt_int_reg_t next_frame[2];
  544. if (state->fp == -1) {
  545. /* No parent frame. */
  546. return false;
  547. }
  548. /* Try to read the frame linkage data chaining to the next function. */
  549. if (!state->read_memory_func(&next_frame, state->fp, sizeof next_frame,
  550. state->read_memory_func_extra)) {
  551. return false;
  552. }
  553. next_fp = next_frame[1];
  554. if (!valid_addr_reg(next_frame[1]) ||
  555. next_fp % sizeof(bt_int_reg_t) != 0) {
  556. /* Caller's frame pointer is suspect, so give up. */
  557. return false;
  558. }
  559. if (state->initial_frame_caller_pc != -1) {
  560. /* We must be in the initial stack frame and already know the
  561. * caller PC.
  562. */
  563. next_pc = state->initial_frame_caller_pc;
  564. /* Force reading stack next time, in case we were in the
  565. * initial frame. We don't do this above just to paranoidly
  566. * avoid changing the struct at all when we return false.
  567. */
  568. state->initial_frame_caller_pc = -1;
  569. } else {
  570. /* Get the caller PC from the frame linkage area. */
  571. next_pc = next_frame[0];
  572. if (!valid_addr_reg(next_frame[0]) || next_pc == 0 ||
  573. next_pc % TILE_BUNDLE_ALIGNMENT_IN_BYTES != 0) {
  574. /* The PC is suspect, so give up. */
  575. return false;
  576. }
  577. }
  578. /* Update state to become the caller's stack frame. */
  579. state->pc = next_pc;
  580. state->sp = state->fp;
  581. state->fp = next_fp;
  582. return true;
  583. }