Reworked test files for better error reporting
[nasm/perl-rewrite.git] / perl / lib / Nasm / Regs / Format / YAML.pm
blob30d0e639ac7140da645693afe5cbaa59e11b5d2b
1 =head1 NAME
3 Nasm::Regs::Format::YAML
5 =cut
7 package Nasm::Regs::Format::YAML;
8 use strict;
9 use warnings;
11 use YAML::XS;
13 sub _format{
14 my($regs) = @_;
16 my @names = $regs->RegisterNames;
17 my %data;
19 my $count = 1;
20 for my $name (@names){
21 my $reg = $regs->Register($name);
22 $data{$name} = {
23 AssemblerClass => $reg->AssemblerClass,
24 DisassemblerClasses => [$reg->DisassemblerClasses],
25 x86RegisterNumber => $reg->x86RegisterNumber,
26 Index => $count++
30 Dump \%data