tagged release 0.7.1
[parrot.git] / compilers / bcg / src / bcg_emitter_pasm.c
blobf314928f7474c5880ba49501f617c6392924a4ce
1 /*
2 * $Id$
3 * Copyright (C) 2006-2007, The Perl Foundation.
4 */
6 /*
8 =head1 NAME
10 bcg_emitter_pasm.c
12 =head1 DESCRIPTION
14 RT#48264
16 =head2 Methods
18 =over 4
20 =cut
24 #include "bcg_emitter.h"
25 #include "bcg_private.h"
26 #include "bcg.h"
30 =item C<void
31 emit_pasm(BCG_info * bcg_info)>
33 RT#48260: Not yet documented!!!
35 =cut
39 void
40 emit_pasm(BCG_info * bcg_info)
42 bcg_unit *unit;
43 bcg_info_private *bcg_info_priv;
45 bcg_info_priv = BCG_INFO_PRIV(bcg_info);
46 unit = bcg_info_priv->first_unit;
48 while (unit) {
49 bcg_op *op;
50 op = unit->first_op;
52 printf("_%s:\n", unit->name);
53 while (op) {
54 if (op->type == BCG_OP_LABEL) {
55 printf("%s:\n", op->name);
57 else {
58 int i;
59 bcg_op_arg *op_arg;
60 printf(" %s", op->full_name);
61 for (i = 0; i < op->op_arg_count; i++) {
62 op_arg = op->op_args[i];
63 if (op_arg->is_constant) {
64 printf(", \"%s\"", op_arg->name);
66 else {
67 printf(" %c%d", op_arg->data_type, op_arg->reg_num);
70 printf("\n");
73 op = op->next;
75 unit = unit->next;
77 printf(" end\n");
82 =back
84 =cut
89 * Local variables:
90 * c-file-style: "parrot"
91 * End:
92 * vim: expandtab shiftwidth=4: