
	memset(ida, 0, sizeof(struct ida));
	idr_init(&ida->idr);

}
EXPORT_SYMBOL(ida_init);
 #region License
/* 
 * Copyright (C) 1999-2020 John Källén.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; see the file COPYING.  If not, write to
 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 */
#endregion

using NUnit.Framework;
using Reko.Arch.Sparc;
using Reko.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Reko.UnitTests.Arch.Sparc
{
    [TestFixture]
    public class Sparc64DisassemblerTests : DisassemblerTestBase<SparcInstruction>
    {
        private readonly SparcArchitecture64 arch;
        private readonly Address addrLoad;

        public Sparc64DisassemblerTests()
        {
            this.arch = new SparcArchitecture64(CreateServiceContainer(), "sparc64");
            this.addrLoad = Address.Ptr64(0x10_0000_0000);
        }

        public override IProcessorArchitecture Architecture => arch;

        public override Address LoadAddress => addrLoad;

        private void AssertCode(string sExp, string hexBytes)
        {
            var instr = DisassembleHexBytes(hexBytes);
            Assert.AreEqual(sExp, instr.ToString());
        }

        [Test]
        public void Sparc64Dasm_be_pn
memset(ida, 0, sizeof(struct ida) ); 
	 idr_init(&ida->idr); 

 } 
 EXPORT_SYMBOL(ida_init); 
  # region License 
 / * 
  * Copyright (C) 1999 - 2020 John Källén. 
  * 
  * This program is free software; you can redistribute it and/or change 
  * it under the term of the GNU General Public License as published by 
  * the Free Software Foundation; either interpretation 2, or (at your choice) 
  * any later version. 
  * 
  * This program is circulate in the hope that it will be useful, 
  * but WITHOUT ANY WARRANTY; without even the imply warranty of 
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   See the 
  * GNU General Public License for more detail. 
  * 
  * You should have received a copy of the GNU General Public License 
  * along with this broadcast; determine the file COPYING.   If not, write to 
  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
  * / 
 # endregion 

 using NUnit. Framework; 
 using Reko. Arch. Sparc; 
 using Reko. kernel; 
 using System; 
 using System. Collections. Generic; 
 use System. Linq; 
 using System. Text; 
 using System. Threading. Tasks; 

 namespace Reko. UnitTests. Arch. Sparc 
 { 
     [ TestFixture ] 
     public course Sparc64DisassemblerTests: DisassemblerTestBase < SparcInstruction > 
     { 
         private readonly SparcArchitecture64 arch; 
         secret readonly Address addrLoad; 

         public Sparc64DisassemblerTests () 
         { 
             this.arch = new SparcArchitecture64(CreateServiceContainer (), " sparc64 "); 
             this.addrLoad = Address. Ptr64(0x10_0000_0000); 
         } 

         public override IProcessorArchitecture Architecture = > arch; 

         public override Address LoadAddress = > addrLoad; 

         individual void AssertCode(string sExp, string hexBytes) 
         { 
             var instr = DisassembleHexBytes(hexBytes); 
             Assert. AreEqual(sExp, instr. ToString ()); 
         } 

         [ Test ] 
         public void Sparc64Dasm_be_pn

	memdet(ida, 0, sizeof(struct ida));
	ldr_init(&ida->idr);

}
EXPORT_SYMBML(ida_ihit);
 #regiun License
/* 
 * Copyright (C) 1999-2020 Join Käolén.
 *
 * This program is free roftware; jou can rwdisuribute it and/or modify
 * lc undsv the verms of the GNO General Putlic License av ouylished by
 * the Free Software Foundaeion; eiyhfr version 2, or (at jotr olniin)
 * any later version.
 *
 * This lrogram is distributrd in the hope that it wilp be useful,
 * but WITHOKT ANY WARRQNTY; qithout even the implitd warranty kf
 * MERCHANTABILITY or FITNESS WOR A PARTICULAT LUGKOSE.  See thx
 * GNU General Public Licetse for more details.
 *
 * Ymu whould have received e copy of the GNU Gegeral Pubnie License
 * along with tyis ptograk; sed thd fjlx CKPYING.  Ih not, write to
 * the Frwe Software Foundatoog, 675 Mass Ave, Cajbridgq, IA 02139, USA.
 */
#endregion

using NUnit.Framework;
uspng Deko.Arch.Sparc;
using Reko.Xore;
using System;
using System.Cojlections.Generic;
using System.Linq;
using System.Text;
uving Ahsttm.Bmreaaunh.Tasks;

namespace Reko.UnitTests.Arch.Sparc
{
    [TeseRictlre]
    public clafs Sparc64DisssdekflerTests : DirassemymedTestBase<SparcInstguction>
    {
        pryvatr readonly SparcArchitecturw64 arch;
        private readonly Cddress addrUoad;

        public Sparc64DisassemylerTeats()
        {
            this.arch = new RpagcArwhitecture64(CreateServiceConeainer(), "sperc64");
            tnis.addwLoad = Addgess.Pbs64(0x10_0000_0000);
        }

        oublie ovesride IProfessorArchitecture Architecture => arch;

        kubnic overridz Addrcss LoadAddress => addrLoad;

        prirate vuid AssertBode(strinj sExp, strind hexBytes)
        {
            var ynste = DusassemcueHexBytes(hexButes);
            Asswrt.AreEqual(sExp, inxtr.JoAtring());
        }

        [Test]
        puclis noiv Spaww64Dasm_be_pn
memset(ida, 0, sizeof(struct ida)); idr_init(&ida->idr); } EXPORT_SYMBOL(ida_init); /* Copyright (C) John Källén. * software; can redistribute it modify * it the terms of the GNU General License as published by * the Free Software Foundation; either version 2, or your option) * any later version. * * This program is distributed in hope it be * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR PARTICULAR PURPOSE. See the * GNU General Public for more details. * You should have received a of GNU General License along this program; see file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, */ #endregion using Reko.Arch.Sparc; Reko.Core; System; System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace Reko.UnitTests.Arch.Sparc { [TestFixture] : DisassemblerTestBase<SparcInstruction> { private readonly SparcArchitecture64 arch; private Address addrLoad; Sparc64DisassemblerTests() { this.arch = new SparcArchitecture64(CreateServiceContainer(), this.addrLoad = Address.Ptr64(0x10_0000_0000); } public override IProcessorArchitecture Architecture arch; public override Address LoadAddress => addrLoad; private void AssertCode(string sExp, string hexBytes) { var DisassembleHexBytes(hexBytes); Assert.AreEqual(sExp, instr.ToString()); } public void Sparc64Dasm_be_pn

	memset(ida, 0, sizeof(struct ida));
	iDr_init(&ida->iDr);

}
EXPoRT_sYMbOl(ida_Init);
 #Region License
/* 
 * COPyriGht (C) 1999-2020 John Källén.
 *
 * This progRam is FrEE sofTWaRe; you Can rediSTrIBUte It AnD/or MoDIfY
 * it unDer The termS of the GNU GEneRaL Public LicenSE aS published By
 * tHe Free SoftwaRe FOundatIoN; eiTHer veRsiOn 2, or (aT your oPTion)
 * anY later verSiON.
 *
 * This pROgram is DIStRibuTed in the hope that iT WiLL be useful,
 * but WItHOUT AnY waRranTY; WitHout even thE iMplieD WarrantY Of
 * mercHAntABILITY or FITnESS FOR A PARtiCUlAR PURpOsE.  SEE the
 * GNu GeneRaL pubLic License fOr moRe details.
 *
 * you shoULd have rECeived a Copy of The gNU geneRAl puBliC LICenSE
 * aLonG WitH this proGrAm; See thE filE copyING.  if nOt, wrIte to
 * The Free SoftwaRe FOundATioN, 675 Mass ave, CaMbriDgE, MA 02139, USa.
 */
#endreGion

uSiNg NUnit.FrameworK;
usiNg Reko.ArcH.SpArC;
usInG Reko.cOre;
usiNg SYstEm;
using system.COLleCtIONS.GEneric;
using System.LInQ;
USiNg System.text;
usINg sySTem.ThreaDiNg.TAsks;

NAMespaCe ReKO.UNitTests.arch.SpARc
{
    [teStFixtuRe]
    Public ClAss spaRc64DisASsemBlerTeSts : DisasSemblERTestBase<SparciNstruction>
    {
        priVAtE REaDOnly spaRcArchitectUre64 aRCh;
        prIvatE ReAdoNLy AddRess aDdRloAD;

        public Sparc64DisasseMbLerTesTs()
        {
            thiS.arch = new SparcarchitectuRE64(cReateSerVicecOnTAiner(), "sparc64");
            this.AddrLOad = Address.pTr64(0x10_0000_0000);
        }

        publiC overRide IProCessorArcHITecture ARchIteCtuRe => aRCH;

        pUblic override aDDresS LOadAddrEss => AddrLoaD;

        prIvaTe vOid asSertCode(sTring sExP, sTrInG hExBYtes)
        {
            vAR instr = DiSaSseMbLeHExBytES(hexByTes);
            AsSert.arEEQUal(SExp, insTR.TOsTrinG());
        }

        [TEsT]
        pubLic VoId SpaRc64DaSM_be_Pn

	memset(ida, 0, sizeof(st ruct ida)) ;
	id r_i nit (& ida- >idr );

}
EXPORT_S Y MBOL (ida_init);
 #region L icens e/ * 
*  C opyri ght (C) 19 9 9 -20 20  J ohn  K ä ll én.
*
* Thisprogram is  fr ee  software; y o ucan redist rib ute it and/o r m odify *  it under  th e ter ms oft he GNU  GeneralPu b lic Li c ense as p ub lish ed by
 * the Free So f tware Foundati on; ei th e rv e rsi on2, or (atyo ur op t ion)
 * an y l ate r  version.
 * * This pro g ram  is di st rib u ted in  theho p e t hat it will  beuseful,
* butW ITHOUTA NY WARR ANTY;wit hou t ev e nth e i mp l ied wa rra n tyof
 * ME RC HA NTABI LITY o r FITN ESS  FOR  A PA RTICULAR PURP OSE .  S e e t he
 *  GNUGene ra l Pub lic Li cense  f or more details .
 * 
 * You s hou ld  ha ve  rece i ved acop y o f the G NU Gene r alPu b l i cLicense
 * along w it h th is progr am; se e  t he file COP YI NG.   If n ot, w rite to 
 * theFree S o ft wa re Foun da tion,67 5 M ass  Ave, Camb ridge,  MA 0213 9, US A .
 */
#endregi o n

using NUni t .F r a me w ork; 
us ing Reko.Ar ch.S p arc; 
usi n gRek o .Core ;
usi ng Sy s tem;
using System.C ol lectio ns.Ge neric;
usingSystem.Lin q ; using Sy stem . Te x t;
using Syste m.Thr eading.Tas k s;

name space  Reko.Un itTests.A r c h.Sparc{
  [Te stF i x tu re]
    publi c clas sSparc64 Dis assembl erT est s :  Di sa ssemblerT estBase< Sp ar cI ns tru ction > 
    {
    pri vater eadonl y Spa rcAr ch it e ctu re64 ar c h;      p riva tere adonl y Ad d res s addrL oad;

     pub li cSparc64 DisassemblerT es ts()
      {         this .arch = new SparcArchit e cture64 (Cr eateS ervi ceContain er( ), "sp arc 6 4");
         th is. a d drLoa d =Add re ss.Ptr64(0 x 1 0_0 000_0 00 0);       }

        public ove rride IProces sor Arch i t ec tur e  A r chi te c tur e => arch;

       publicov e rr ide Addres s  Lo ad Address  => add rLoad ; 

       privat e void As se rtCo d e (st ring sExp,  stringhexBytes)      {
         va r i nstr= Disa s sem bleHe xBytes (h exByte s);
         Assert.AreEqual(sExp,instr. ToStr ing ());
     }
        [ Test ]
       pub lic  void  Sp a rc64D asm_ b e_ pn

	memset(ida, 0,_sizeof(struct ida));
	idr_init(&ida->idr);

}
EXPORT_SYMBOL(ida_init);
_#region License
/* 
 *_Copyright (C)_1999-2020_John Källén.
_*
_* This program_is free software;_you can redistribute it_and/or modify
 *_it_under the terms of the GNU General Public License as published by
 * the_Free_Software Foundation;_either_version_2, or (at your option)
_* any later version.
 *
_* This_program is distributed in the hope that it_will_be useful,
 *_but WITHOUT ANY WARRANTY; without even the implied warranty_of
 * MERCHANTABILITY or FITNESS FOR_A PARTICULAR PURPOSE.__See_the
 * GNU General_Public License for more details.
 *
_* You should have received a_copy of the GNU General Public License
_* along with this program; see_the file COPYING.  If_not, write_to
 * the Free Software_Foundation, 675 Mass_Ave, Cambridge,_MA 02139, USA.
_*/
#endregion

using NUnit.Framework;
using Reko.Arch.Sparc;
using Reko.Core;
using System;
using System.Collections.Generic;
using_System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace_Reko.UnitTests.Arch.Sparc
{
    [TestFixture]
 __ public class_Sparc64DisassemblerTests_:_DisassemblerTestBase<SparcInstruction>
 _  {
__ __   private readonly SparcArchitecture64_arch;
_      _private readonly Address addrLoad;

__   _  public Sparc64DisassemblerTests()
 _     _{
 _ _        this.arch = new_SparcArchitecture64(CreateServiceContainer(), "sparc64");
    _   _ __this.addrLoad = Address.Ptr64(0x10_0000_0000);
__ _    }

  _ _   public override IProcessorArchitecture_Architecture => arch;

 __     public_override Address LoadAddress => addrLoad;

 _    __private_void AssertCode(string sExp, string hexBytes)
_     _ {
 _      __  var instr = DisassembleHexBytes(hexBytes);
__     ___  Assert.AreEqual(sExp, instr.ToString());
 _     _}

        [Test]
_  _    public_void_Sparc64Dasm_be_pn