repo.or.cz
/
nasm
/
perl-rewrite.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Added POD tests and a Perl::Critic test
[nasm/perl-rewrite.git]
/
perl
/
lib
/
Nasm
/
Regs
/
Format
/
C.pm
blob
0926bca65ae22449fc4a25c3d6400ea68257fea0
1
=head1 NAME
2
3
Nasm::Regs::Format::C
4
5
=cut
6
7
package
Nasm
::
Regs
::
Format
::
C
;
8
use
strict
;
9
use
warnings
;
10
11
sub
_format
{
12
my
(
$regs
) =
@_
;
13
my
$filename
=
$regs
->
filename
;
14
15
my
$out
=
<<END;
16
/* automatically generated from
$filename
- do not edit */
17
18
#include "tables.h"
19
20
const char * const nasm_reg_names[] = {
21
END
22
23
my
@names
=
$regs
->
names
;
24
25
$out
.=
qq
[
"];
26
$out
.= join qq["
,
\n
"],
@names
;
27
28
$out
.= qq["
\n
};
\n
];
29
30
return
$out
;
31
}
32
33
1
;