This commit is contained in:
Dan-guanghua
2025-12-15 12:05:06 +08:00
parent 749e9926e5
commit 90c69ea943
18 changed files with 9373 additions and 866 deletions

View File

@@ -1,98 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<Network xmlns="http://www.xmos.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xmos.com http://www.xmos.com" ManuallySpecifiedRouting="true">
<Type>Board</Type>
<Name>XS2 MC Audio</Name>
<Declarations>
<Declaration>tileref tile[2]</Declaration>
<Declaration>tileref usb_tile</Declaration>
</Declarations>
<Packages>
<Package id="0" Type="XS2-UnA-512-FB236">
<Nodes>
<Node Id="0" InPackageId="0" Type="XS2-L16A-512" Oscillator="24MHz" SystemFrequency="500MHz" referencefrequency="100MHz">
<Boot>
<Source Location="SPI:bootFlash"/>
</Boot>
<Tile Number="0" Reference="tile[0]">
<Port Location="XS1_PORT_1B" Name="PORT_SQI_CS"/>
<Port Location="XS1_PORT_1C" Name="PORT_SQI_SCLK"/>
<Port Location="XS1_PORT_4B" Name="PORT_SQI_SIO"/>
<!-- Audio Ports -->
<Port Location="XS1_PORT_1A" Name="PORT_PLL_REF"/>
<Port Location="XS1_PORT_1F" Name="PORT_MCLK_IN"/>
<Port Location="XS1_PORT_1G" Name="PORT_I2S_LRCLK"/>
<Port Location="XS1_PORT_1H" Name="PORT_I2S_BCLK"/>
<Port Location="XS1_PORT_1M" Name="PORT_I2S_DAC0"/>
<port Location="XS1_PORT_1N" Name="PORT_I2S_DAC1"/>
<port Location="XS1_PORT_1O" Name="PORT_I2S_DAC2"/>
<port Location="XS1_PORT_1P" Name="PORT_I2S_DAC3"/>
<Port Location="XS1_PORT_1I" Name="PORT_I2S_ADC0"/>
<Port Location="XS1_PORT_1J" Name="PORT_I2S_ADC1"/>
<Port Location="XS1_PORT_1K" Name="PORT_I2S_ADC2"/>
<Port Location="XS1_PORT_1L" Name="PORT_I2S_ADC3"/>
<Port Location="XS1_PORT_4A" Name="PORT_I2C"/>
<Port Location="XS1_PORT_1M" Name="PORT_DSD_DAC0"/>
<port Location="XS1_PORT_1N" Name="PORT_DSD_DAC1"/>
<Port Location="XS1_PORT_1G" Name="PORT_DSD_CLK"/>
<Port Location="XS1_PORT_1E" Name="PORT_ADAT_OUT"/>--> <!-- D: COAX E: OPT -->
<Port Location="XS1_PORT_1D" Name="PORT_SPDIF_OUT"/>--> <!-- D: COAX E: OPT -->
</Tile>
<Tile Number="1" Reference="tile[1]">
<Port Location="XS1_PORT_1H" Name="PORT_USB_TX_READYIN"/>
<Port Location="XS1_PORT_1J" Name="PORT_USB_CLK"/>
<Port Location="XS1_PORT_1K" Name="PORT_USB_TX_READYOUT"/>
<Port Location="XS1_PORT_1I" Name="PORT_USB_RX_READY"/>
<Port Location="XS1_PORT_1E" Name="PORT_USB_FLAG0"/>
<Port Location="XS1_PORT_1F" Name="PORT_USB_FLAG1"/>
<Port Location="XS1_PORT_1G" Name="PORT_USB_FLAG2"/>
<Port Location="XS1_PORT_8A" Name="PORT_USB_TXD"/>
<Port Location="XS1_PORT_8B" Name="PORT_USB_RXD"/>
<!-- Audio Ports -->
<Port Location="XS1_PORT_16B" Name="PORT_MCLK_COUNT"/>
<Port Location="XS1_PORT_1L" Name="PORT_MCLK_IN2"/>
<Port Location="XS1_PORT_1M" Name="PORT_MIDI_IN"/>
<Port Location="XS1_PORT_1N" Name="PORT_MIDI_OUT"/>
<Port Location="XS1_PORT_1O" Name="PORT_ADAT_IN"/>--> <!-- P: COAX O: OPT -->
<Port Location="XS1_PORT_1P" Name="PORT_SPDIF_IN"/>--> <!-- P: COAX O: OPT -->
</Tile>
</Node>
<Node Id="1" InPackageId="1" Type="periph:XS1-SU" Reference="usb_tile" Oscillator="24MHz">
</Node>
</Nodes>
<Links>
<Link Encoding="5wire">
<LinkEndpoint NodeId="0" Link="8" Delays="52clk,52clk"/>
<LinkEndpoint NodeId="1" Link="XL0" Delays="1clk,1clk"/>
</Link>
</Links>
</Package>
</Packages>
<Nodes>
<Node Id="2" Type="device:" RoutingId="0x8000">
<Service Id="0" Proto="xscope_host_data(chanend c);">
<Chanend Identifier="c" end="3"/>
</Service>
</Node>
</Nodes>
<Links>
<Link Encoding="2wire" Delays="4,4" Flags="XSCOPE">
<LinkEndpoint NodeId="0" Link="XL0"/>
<LinkEndpoint NodeId="2" Chanend="1"/>
</Link>
</Links>
<ExternalDevices>
<Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash" Type="S25FL116K" PageSize="256" SectorSize="4096" NumPages="8192">
<Attribute Name="PORT_SQI_CS" Value="PORT_SQI_CS"/>
<Attribute Name="PORT_SQI_SCLK" Value="PORT_SQI_SCLK"/>
<Attribute Name="PORT_SQI_SIO" Value="PORT_SQI_SIO"/>
<Attribute Name="QE_REGISTER" Value="flash_qe_location_status_reg_1"/>
<Attribute Name="QE_BIT" Value="flash_qe_bit_1"/>
</Device>
</ExternalDevices>
<JTAGChain>
<JTAGDevice NodeId="0"/>
<JTAGDevice NodeId="1"/>
</JTAGChain>
</Network>
<?xml version="1.0" encoding="UTF-8"?>
<Network xmlns="http://www.xmos.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xmos.com http://www.xmos.com" ManuallySpecifiedRouting="true">
<Type>Board</Type>
<Name>XS2 MC Audio</Name>
<Declarations>
<Declaration>tileref tile[2]</Declaration>
<Declaration>tileref usb_tile</Declaration>
</Declarations>
<Packages>
<Package id="0" Type="XS2-UnA-512-FB236">
<Nodes>
<Node Id="0" InPackageId="0" Type="XS2-L16A-512" Oscillator="24MHz" SystemFrequency="500MHz" referencefrequency="100MHz">
<Boot>
<Source Location="SPI:bootFlash"/>
</Boot>
<Tile Number="0" Reference="tile[0]">
<Port Location="XS1_PORT_1B" Name="PORT_SQI_CS"/>
<Port Location="XS1_PORT_1C" Name="PORT_SQI_SCLK"/>
<Port Location="XS1_PORT_4B" Name="PORT_SQI_SIO"/>
<!-- Audio Ports -->
<Port Location="XS1_PORT_1A" Name="PORT_PLL_REF"/>
<Port Location="XS1_PORT_1F" Name="PORT_MCLK_IN"/>
<Port Location="XS1_PORT_1G" Name="PORT_I2S_LRCLK"/>
<Port Location="XS1_PORT_1H" Name="PORT_I2S_BCLK"/>
<Port Location="XS1_PORT_1M" Name="PORT_I2S_DAC0"/>
<port Location="XS1_PORT_1N" Name="PORT_I2S_DAC1"/>
<port Location="XS1_PORT_1O" Name="PORT_I2S_DAC2"/>
<port Location="XS1_PORT_1P" Name="PORT_I2S_DAC3"/>
<Port Location="XS1_PORT_1I" Name="PORT_I2S_ADC0"/>
<Port Location="XS1_PORT_1J" Name="PORT_I2S_ADC1"/>
<Port Location="XS1_PORT_1K" Name="PORT_I2S_ADC2"/>
<Port Location="XS1_PORT_1L" Name="PORT_I2S_ADC3"/>
<Port Location="XS1_PORT_4A" Name="PORT_I2C"/>
<Port Location="XS1_PORT_1M" Name="PORT_DSD_DAC0"/>
<port Location="XS1_PORT_1N" Name="PORT_DSD_DAC1"/>
<Port Location="XS1_PORT_1G" Name="PORT_DSD_CLK"/>
<Port Location="XS1_PORT_1E" Name="PORT_ADAT_OUT"/>--> <!-- D: COAX E: OPT -->
<Port Location="XS1_PORT_1D" Name="PORT_SPDIF_OUT"/>--> <!-- D: COAX E: OPT -->
</Tile>
<Tile Number="1" Reference="tile[1]">
<Port Location="XS1_PORT_1H" Name="PORT_USB_TX_READYIN"/>
<Port Location="XS1_PORT_1J" Name="PORT_USB_CLK"/>
<Port Location="XS1_PORT_1K" Name="PORT_USB_TX_READYOUT"/>
<Port Location="XS1_PORT_1I" Name="PORT_USB_RX_READY"/>
<Port Location="XS1_PORT_1E" Name="PORT_USB_FLAG0"/>
<Port Location="XS1_PORT_1F" Name="PORT_USB_FLAG1"/>
<Port Location="XS1_PORT_1G" Name="PORT_USB_FLAG2"/>
<Port Location="XS1_PORT_8A" Name="PORT_USB_TXD"/>
<Port Location="XS1_PORT_8B" Name="PORT_USB_RXD"/>
<!-- Audio Ports -->
<Port Location="XS1_PORT_16B" Name="PORT_MCLK_COUNT"/>
<Port Location="XS1_PORT_1L" Name="PORT_MCLK_IN2"/>
<Port Location="XS1_PORT_1M" Name="PORT_MIDI_IN"/>
<Port Location="XS1_PORT_1N" Name="PORT_MIDI_OUT"/>
<Port Location="XS1_PORT_1O" Name="PORT_ADAT_IN"/>--> <!-- P: COAX O: OPT -->
<Port Location="XS1_PORT_1P" Name="PORT_SPDIF_IN"/>--> <!-- P: COAX O: OPT -->
</Tile>
</Node>
<Node Id="1" InPackageId="1" Type="periph:XS1-SU" Reference="usb_tile" Oscillator="24MHz">
</Node>
</Nodes>
<Links>
<Link Encoding="5wire">
<LinkEndpoint NodeId="0" Link="8" Delays="52clk,52clk"/>
<LinkEndpoint NodeId="1" Link="XL0" Delays="1clk,1clk"/>
</Link>
</Links>
</Package>
</Packages>
<Nodes>
<Node Id="2" Type="device:" RoutingId="0x8000">
<Service Id="0" Proto="xscope_host_data(chanend c);">
<Chanend Identifier="c" end="3"/>
</Service>
</Node>
</Nodes>
<Links>
<Link Encoding="2wire" Delays="4,4" Flags="XSCOPE">
<LinkEndpoint NodeId="0" Link="XL0"/>
<LinkEndpoint NodeId="2" Chanend="1"/>
</Link>
</Links>
<ExternalDevices>
<Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash" Type="S25FL116K" PageSize="256" SectorSize="4096" NumPages="8192">
<Attribute Name="PORT_SQI_CS" Value="PORT_SQI_CS"/>
<Attribute Name="PORT_SQI_SCLK" Value="PORT_SQI_SCLK"/>
<Attribute Name="PORT_SQI_SIO" Value="PORT_SQI_SIO"/>
<Attribute Name="QE_REGISTER" Value="flash_qe_location_status_reg_1"/>
<Attribute Name="QE_BIT" Value="flash_qe_bit_1"/>
</Device>
</ExternalDevices>
<JTAGChain>
<JTAGDevice NodeId="0"/>
<JTAGDevice NodeId="1"/>
</JTAGChain>
</Network>

View File

@@ -1,120 +1,120 @@
// Copyright 2016-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
.section .dp.data,"awd",@progbits
.text
#if (defined(__XS2A__) || defined (__XS3A__))
.cc_top dsp_sqrt30_xs2.function
.globl dsp_sqrt30_xs2
.type dsp_sqrt30_xs2,@function
#define NSTACKWORDS 2
// void dsp_sqrt30_xs2(uint32_t x)
.align 16
.globl sqrt_as
.issue_mode dual
dsp_sqrt30_xs2:
dualentsp 0 //TODO remove this - it's here to allow call from SI
{ bf r0, zero_sqrt ; clz r11, r0 }
{ dualentsp NSTACKWORDS ; shr r3, r11, 1 }
{ shl r2, r3, 1 ; ldc r11, 25 }
{ shl r0, r0, r2 ; stw r5, sp[0] }
{ shr r1, r0, 2 ; ldc r5, 2 }
{ shr r2, r1, r11 ; ldap r11, firstbitslookup - 8 }
{ ld8u r2, r11[r2] ; shl r1, r1, 4 }
{ mul r11, r2, r2 }
{ shl r11, r11, 24 ; stw r4, sp[1] }
{ shl r2, r2, 6 ; shl r0, r2, 24 }
{ sub r1, r1, r11 ; ldap r11, jumptable-16*64}
{ add r2, r2, r11 ; ldc r4, 26 }
{ shr r11, r1, r4 ; shl r5, r5, 24 }
next:
{ ld8u r11, r2[r11] ; shr r5, r5, 2 }
{ bru r11 ; shl r1, r1, 2 }
//bp
{ bt r5, next ; shr r11, r1, r4 }
{ ldw r4, sp[1] ; shl r0, r0, 1 }
{ ldw r5, sp[0] ; }
{ retsp NSTACKWORDS ; shr r0, r0, r3 }
//nobp_sh_ne
{ bf r5, lastbit_sh_ne ; sub r11, r0, r5 }
{ sub r0, r0, r5 ; shl r11, r11, 3 }
{ sub r0, r0, r5 ; add r1, r1, r11 }
{ shr r11, r1, r4 ; bu next }
//nobp_sh_none
{ bf r5, lastbit_sh_none ; add r11, r0, r5 }
{ add r0, r0, r5 ; shl r11, r11, 3 }
{ add r0, r0, r5 ; sub r1, r1, r11 }
{ shr r11, r1, r4 ; bu next }
//nobp_nosh_ne
{ shl r11, r5, 1 ; bf r5, lastbit_nosh_ne }
{ shl r11, r0, 2 ; sub r1, r1, r11 }
{ add r1, r1, r11 ; sub r0, r0, r5 }
{ shr r11, r1, r4 ; bu next }
//nobp_nosh_none
{ shl r11, r5, 1 ; bf r5, lastbit_nosh_none }
{ shl r11, r0, 2 ; sub r1, r1, r11 }
{ sub r1, r1, r11 ; add r0, r0, r5 }
{ shr r11, r1, r4 ; bu next }
.align 16
lastbit_sh_ne:
{ ldw r4, sp[1] ; shl r0, r0, 1 }
{ ldw r5, sp[0] ; sub r0, r0, 2 }
{ retsp NSTACKWORDS ; shr r0, r0, r3 }
.align 16
lastbit_sh_none:
{ ldw r4, sp[1] ; shl r0, r0, 1 }
{ ldw r5, sp[0] ; add r0, r0, 2 }
{ retsp NSTACKWORDS ; shr r0, r0, r3 }
.align 16
lastbit_nosh_ne:
{ ldw r4, sp[1] ; shl r0, r0, 1 }
{ ldw r5, sp[0] ; sub r0, r0, 1 }
{ retsp NSTACKWORDS ; shr r0, r0, r3 }
.align 16
lastbit_nosh_none:
{ ldw r4, sp[1] ; shl r0, r0, 1 }
{ ldw r5, sp[0] ; add r0, r0, 1 }
{ retsp NSTACKWORDS ; shr r0, r0, r3 }
zero_sqrt:
{ retsp 0 ; }
firstbitslookup:
.byte 0x10, 0x11, 0x12, 0x13, 0x14, 0x14, 0x15, 0x16, 0x17, 0x17, 0x18, 0x19, 0x19, 0x1a, 0x1b, 0x1b, 0x1c, 0x1c, 0x1d, 0x1d, 0x1e, 0x1e, 0x1f, 0x1f
jumptable:
.byte 0,0,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,12,12,12,12,0,0
.byte 0,0,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,12,12,12,12,0,0
.byte 0,0,16,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4,4,12,12,12,12,12,12,0,0,0
.byte 0,0,0,16,16,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,12,12,12,12,12,12,12,0,0,0
.byte 0,0,0,16,16,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,12,12,12,12,12,12,12,0,0,0
.byte 0,0,0,16,16,16,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,12,12,12,12,12,12,12,12,0,0,0
.byte 0,0,0,16,16,16,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,12,12,12,12,12,12,12,12,0,0,0
.byte 0,0,0,16,16,16,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,12,12,12,12,12,12,12,12,0,0,0
.byte 0,0,0,16,16,16,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,12,12,12,12,12,12,12,12,0,0,0
.tmp_dsp_sqrt30_xs2:
.size dsp_sqrt30_xs2, .tmp_dsp_sqrt30_xs2-dsp_sqrt30_xs2
.align 4
.cc_bottom dsp_sqrt30_xs2.function
.set dsp_sqrt30_xs2.nstackwords,NSTACKWORDS
.globl dsp_sqrt30_xs2.nstackwords
.set dsp_sqrt30_xs2.maxcores,1
.globl dsp_sqrt30_xs2.maxcores
.set dsp_sqrt30_xs2.maxtimers,0
.globl dsp_sqrt30_xs2.maxtimers
.set dsp_sqrt30_xs2.maxchanends,0
.globl dsp_sqrt30_xs2.maxchanends
#endif
// Copyright 2016-2021 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
.section .dp.data,"awd",@progbits
.text
#if (defined(__XS2A__) || defined (__XS3A__))
.cc_top dsp_sqrt30_xs2.function
.globl dsp_sqrt30_xs2
.type dsp_sqrt30_xs2,@function
#define NSTACKWORDS 2
// void dsp_sqrt30_xs2(uint32_t x)
.align 16
.globl sqrt_as
.issue_mode dual
dsp_sqrt30_xs2:
dualentsp 0 //TODO remove this - it's here to allow call from SI
{ bf r0, zero_sqrt ; clz r11, r0 }
{ dualentsp NSTACKWORDS ; shr r3, r11, 1 }
{ shl r2, r3, 1 ; ldc r11, 25 }
{ shl r0, r0, r2 ; stw r5, sp[0] }
{ shr r1, r0, 2 ; ldc r5, 2 }
{ shr r2, r1, r11 ; ldap r11, firstbitslookup - 8 }
{ ld8u r2, r11[r2] ; shl r1, r1, 4 }
{ mul r11, r2, r2 }
{ shl r11, r11, 24 ; stw r4, sp[1] }
{ shl r2, r2, 6 ; shl r0, r2, 24 }
{ sub r1, r1, r11 ; ldap r11, jumptable-16*64}
{ add r2, r2, r11 ; ldc r4, 26 }
{ shr r11, r1, r4 ; shl r5, r5, 24 }
next:
{ ld8u r11, r2[r11] ; shr r5, r5, 2 }
{ bru r11 ; shl r1, r1, 2 }
//bp
{ bt r5, next ; shr r11, r1, r4 }
{ ldw r4, sp[1] ; shl r0, r0, 1 }
{ ldw r5, sp[0] ; }
{ retsp NSTACKWORDS ; shr r0, r0, r3 }
//nobp_sh_ne
{ bf r5, lastbit_sh_ne ; sub r11, r0, r5 }
{ sub r0, r0, r5 ; shl r11, r11, 3 }
{ sub r0, r0, r5 ; add r1, r1, r11 }
{ shr r11, r1, r4 ; bu next }
//nobp_sh_none
{ bf r5, lastbit_sh_none ; add r11, r0, r5 }
{ add r0, r0, r5 ; shl r11, r11, 3 }
{ add r0, r0, r5 ; sub r1, r1, r11 }
{ shr r11, r1, r4 ; bu next }
//nobp_nosh_ne
{ shl r11, r5, 1 ; bf r5, lastbit_nosh_ne }
{ shl r11, r0, 2 ; sub r1, r1, r11 }
{ add r1, r1, r11 ; sub r0, r0, r5 }
{ shr r11, r1, r4 ; bu next }
//nobp_nosh_none
{ shl r11, r5, 1 ; bf r5, lastbit_nosh_none }
{ shl r11, r0, 2 ; sub r1, r1, r11 }
{ sub r1, r1, r11 ; add r0, r0, r5 }
{ shr r11, r1, r4 ; bu next }
.align 16
lastbit_sh_ne:
{ ldw r4, sp[1] ; shl r0, r0, 1 }
{ ldw r5, sp[0] ; sub r0, r0, 2 }
{ retsp NSTACKWORDS ; shr r0, r0, r3 }
.align 16
lastbit_sh_none:
{ ldw r4, sp[1] ; shl r0, r0, 1 }
{ ldw r5, sp[0] ; add r0, r0, 2 }
{ retsp NSTACKWORDS ; shr r0, r0, r3 }
.align 16
lastbit_nosh_ne:
{ ldw r4, sp[1] ; shl r0, r0, 1 }
{ ldw r5, sp[0] ; sub r0, r0, 1 }
{ retsp NSTACKWORDS ; shr r0, r0, r3 }
.align 16
lastbit_nosh_none:
{ ldw r4, sp[1] ; shl r0, r0, 1 }
{ ldw r5, sp[0] ; add r0, r0, 1 }
{ retsp NSTACKWORDS ; shr r0, r0, r3 }
zero_sqrt:
{ retsp 0 ; }
firstbitslookup:
.byte 0x10, 0x11, 0x12, 0x13, 0x14, 0x14, 0x15, 0x16, 0x17, 0x17, 0x18, 0x19, 0x19, 0x1a, 0x1b, 0x1b, 0x1c, 0x1c, 0x1d, 0x1d, 0x1e, 0x1e, 0x1f, 0x1f
jumptable:
.byte 0,0,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,12,12,12,12,0,0
.byte 0,0,16,16,16,16,8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,12,12,12,12,0,0,0
.byte 0,0,0,16,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,12,12,12,12,12,12,0,0,0
.byte 0,0,0,16,16,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,12,12,12,12,12,12,12,0,0,0
.byte 0,0,0,16,16,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,12,12,12,12,12,12,12,0,0,0
.byte 0,0,0,16,16,16,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,12,12,12,12,12,12,12,12,0,0,0
.byte 0,0,0,16,16,16,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,12,12,12,12,12,12,12,12,0,0,0
.byte 0,0,0,16,16,16,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,12,12,12,12,12,12,12,12,0,0,0
.byte 0,0,0,16,16,16,16,16,16,16,16,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,12,12,12,12,12,12,12,12,0,0,0
.tmp_dsp_sqrt30_xs2:
.size dsp_sqrt30_xs2, .tmp_dsp_sqrt30_xs2-dsp_sqrt30_xs2
.align 4
.cc_bottom dsp_sqrt30_xs2.function
.set dsp_sqrt30_xs2.nstackwords,NSTACKWORDS
.globl dsp_sqrt30_xs2.nstackwords
.set dsp_sqrt30_xs2.maxcores,1
.globl dsp_sqrt30_xs2.maxcores
.set dsp_sqrt30_xs2.maxtimers,0
.globl dsp_sqrt30_xs2.maxtimers
.set dsp_sqrt30_xs2.maxchanends,0
.globl dsp_sqrt30_xs2.maxchanends
#endif