Add resource usage symbols / elimination blocks to assembly files.

See bug 10909 and bug 15022.
This commit is contained in:
Richard Osborne
2013-11-28 14:12:51 +00:00
parent f19653b759
commit 93590833cf
3 changed files with 109 additions and 62 deletions

View File

@@ -5,47 +5,81 @@
#include <xs1_user.h> #include <xs1_user.h>
.text
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// void GetLockResource() // void GetLockResource()
.globl GetLockResource.nstackwords
.linkset GetLockResource.nstackwords, 0
.globl GetLockResource .globl GetLockResource
.text .type GetLockResource, @function
.cc_top GetLockResource.function
.align 2
GetLockResource: GetLockResource:
getr r0, XS1_RES_TYPE_LOCK getr r0, XS1_RES_TYPE_LOCK
retsp 0 retsp 0
.size GetLockResource, .-GetLockResource
.cc_bottom GetLockResource.function
.globl GetLockResource.nstackwords
.globl GetLockResource.maxcores
.globl GetLockResource.maxchanends
.globl GetLockResource.maxtimers
.set GetLockResource.nstackwords, 0
.set GetLockResource.maxcores, 1
.set GetLockResource.maxchanends, 0
.set GetLockResource.maxtimers, 0
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// void ClaimLock(lock l) // void ClaimLock(lock l)
.globl ClaimLock.nstackwords
.linkset ClaimLock.nstackwords, 0
.globl ClaimLock .globl ClaimLock
.text .type ClaimLock, @function
.cc_top ClaimLock.function
.align 2
ClaimLock: ClaimLock:
in r0, res[r0] in r0, res[r0]
retsp 0 retsp 0
.size ClaimLock, .-ClaimLock
.cc_bottom ClaimLock.function
.globl ClaimLock.nstackwords
.globl ClaimLock.maxcores
.globl ClaimLock.maxchanends
.globl ClaimLock.maxtimers
.set ClaimLock.nstackwords, 0
.set ClaimLock.maxcores, 1
.set ClaimLock.maxchanends, 0
.set ClaimLock.maxtimers, 0
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// void FreeLock(lock l) // void FreeLock(lock l)
.globl FreeLock.nstackwords
.linkset FreeLock.nstackwords, 0
.globl FreeLock .globl FreeLock
.text .cc_top FreeLock.function
.align 2
FreeLock: FreeLock:
out res[r0], r0 out res[r0], r0
retsp 0 retsp 0
.size FreeLock, .-FreeLock
.cc_bottom FreeLock.function
.globl FreeLock.nstackwords
.globl FreeLock.maxcores
.globl FreeLock.maxchanends
.globl FreeLock.maxtimers
.set FreeLock.nstackwords, 0
.set FreeLock.maxcores, 1
.set FreeLock.maxchanends, 0
.set FreeLock.maxtimers, 0
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// void FreeLockResource(lock l) // void FreeLockResource(lock l)
.globl FreeLockResource.nstackwords
.linkset FreeLockResource.nstackwords, 0
.globl FreeLockResource .globl FreeLockResource
.text .cc_top FreeLockResource.function
.align 2
FreeLockResource: FreeLockResource:
freer res[r0] freer res[r0]
retsp 0 retsp 0
.size FreeLockResource, .-FreeLockResource
.cc_bottom FreeLockResource.function
.globl FreeLockResource.nstackwords
.globl FreeLockResource.maxcores
.globl FreeLockResource.maxchanends
.globl FreeLockResource.maxtimers
.set FreeLockResource.nstackwords, 0
.set FreeLockResource.maxcores, 1
.set FreeLockResource.maxchanends, 0
.set FreeLockResource.maxtimers, 0

View File

@@ -9,6 +9,7 @@
.cc_top doMix##i.function,doMix##i; \ .cc_top doMix##i.function,doMix##i; \
.align 4 ;\ .align 4 ;\
.globl doMix##i ;\ .globl doMix##i ;\
.type doMix##i, @function ;\
.globl doMix##i##.nstackwords ;\ .globl doMix##i##.nstackwords ;\
.globl doMix##i##.maxthreads ; \ .globl doMix##i##.maxthreads ; \
.globl doMix##i##.maxtimers ; \ .globl doMix##i##.maxtimers ; \
@@ -42,6 +43,7 @@ doMix##i##: ;\
retsp 0x0;\ retsp 0x0;\
\ \
\ \
.size doMix##i, .-doMix##i; \
.cc_bottom doMix##i##.function; .cc_bottom doMix##i##.function;
#define N MIX_INPUTS #define N MIX_INPUTS
@@ -125,8 +127,9 @@ DOMIX_BOT(7)
#define N MAX_MIX_COUNT #define N MAX_MIX_COUNT
.cc_top setPtr.function,setPtr; .cc_top setPtr.function,setPtr;
.align 4 ; .align 4 ;
.globl setPtr.nstackwords;
.globl setPtr; .globl setPtr;
.type setPtr, @function
.globl setPtr.nstackwords;
.globl setPtr.maxthreads; .globl setPtr.maxthreads;
.globl setPtr.maxtimers; .globl setPtr.maxtimers;
.globl setPtr.maxchanends; .globl setPtr.maxchanends;
@@ -151,14 +154,20 @@ setPtr_go:
add r1, r1, r2; add r1, r1, r2;
st8 r1, r11[r0]; st8 r1, r11[r0];
retsp 0; retsp 0;
.size setPtr, .-setPtr
.cc_bottom setPtr.function .cc_bottom setPtr.function
.section .cp.const4, "acM", @progbits, 4 .section .cp.const4, "acM", @progbits, 4
.LC0: .cc_top .LC0.data
.align 4 .align 4
.LC0:
.int 0x7fffff00 .int 0x7fffff00
.cc_bottom .LC0.data
.cc_top .LC1.data
.align 4
.LC1: .LC1:
.int 0x80000000 .int 0x80000000
.cc_bottom .LC1.data
#undef N #undef N
#undef BODY #undef BODY

View File

@@ -1,13 +1,8 @@
#include "xs1_kernel.h" #include "xs1_kernel.h"
#include "xs1_user.h" #include "xs1_user.h"
.global write_sswitch_reg_blind, "f{si}(ui,ui,ui)" .global write_sswitch_reg_blind, "f{si}(ui,ui,ui)"
.global write_sswitch_reg_blind.nstackwords .type write_sswitch_reg_blind, @function
.linkset write_sswitch_reg_blind.nstackwords, 0
//.type read_sswitch_reg, @function
// r0 - coreid // r0 - coreid
// r1 - reg // r1 - reg
// r2 - data // r2 - data
@@ -56,4 +51,13 @@ write_sswitch_reg_blind:
write_switch_reg_fail: write_switch_reg_fail:
ldc r0, 0 ldc r0, 0
retsp 0 retsp 0
.size write_sswitch_reg_blind, .-write_sswitch_reg_blind
.cc_bottom write_sswitch_reg_blind.function .cc_bottom write_sswitch_reg_blind.function
.global write_sswitch_reg_blind.nstackwords
.global write_sswitch_reg_blind.maxchanends
.global write_sswitch_reg_blind.maxtimers
.global write_sswitch_reg_blind.maxcores
.set write_sswitch_reg_blind.nstackwords, 0
.set write_sswitch_reg_blind.maxchanends, 1
.set write_sswitch_reg_blind.maxtimers, 0
.set write_sswitch_reg_blind.maxcores, 0