| 2626 | } |
| 2627 | |
| 2628 | virtual void initLocal(unsigned index, ir::Type type) |
| 2629 | { |
| 2630 | unsigned footprint = typeFootprint(&c, type); |
| 2631 | |
| 2632 | assertT(&c, index + footprint <= c.localFootprint); |
| 2633 | |
| 2634 | Value* v = value(&c, type); |
| 2635 | |
| 2636 | if (footprint > 1) { |
| 2637 | assertT(&c, footprint == 2); |
| 2638 | |
| 2639 | unsigned highIndex; |
| 2640 | unsigned lowIndex; |
| 2641 | if (c.arch->bigEndian()) { |
| 2642 | highIndex = index + 1; |
| 2643 | lowIndex = index; |
| 2644 | } else { |
| 2645 | lowIndex = index + 1; |
| 2646 | highIndex = index; |
| 2647 | } |
| 2648 | |
| 2649 | if (TargetBytesPerWord == 4) { |
| 2650 | initLocalPart(highIndex, type); |
| 2651 | Value* next = c.locals[highIndex].value; |
| 2652 | v->nextWord = next; |
| 2653 | next->nextWord = v; |
| 2654 | next->wordIndex = 1; |
| 2655 | } |
| 2656 | |
| 2657 | index = lowIndex; |
| 2658 | } |
| 2659 | |
| 2660 | if (DebugFrame) { |
| 2661 | fprintf(stderr, |
| 2662 | "init local %p at %d (%d)\n", |
| 2663 | v, |
| 2664 | index, |
| 2665 | frameIndex(&c, index)); |
| 2666 | } |
| 2667 | |
| 2668 | appendFrameSite(&c, v, frameIndex(&c, index)); |
| 2669 | |
| 2670 | Local* local = c.locals + index; |
| 2671 | local->value = v; |
| 2672 | v->home = frameIndex(&c, index); |
| 2673 | } |
| 2674 | |
| 2675 | virtual void initLocalsFromLogicalIp(unsigned logicalIp) |
| 2676 | { |
no test coverage detected