Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // test.S
- .global shlcdc_sqe_event_unsubscribe
- shlcdc_sqe_event_unsubscribe:
- MOV R12, SP
- STMFD SP!, {R4,R5,R11,R12,LR,PC}
- SUB R11, R12, #4
- CMP R0, #11
- MOV R4, R0
- MOV R5, R1
- MOVHI R0, #1
- LDMHIFD SP, {R4,R5,R11,SP,PC}
- MOV R0, #0
- LDMFD SP, {R4,R5,R11,SP,PC}
- //testmain.c
- #include <stdio.h>
- int shlcdc_sqe_event_unsubscribe(int t);
- void main(void)
- {
- int ret, t;
- for(t=-20; t<20; t++){
- ret = shlcdc_sqe_event_unsubscribe(t);
- printf("t=%d ret=%d\n", t, ret);
- }
- }
- //Android.mk
- LOCAL_PATH:= $(call my-dir)
- include $(CLEAR_VARS)
- LOCAL_SRC_FILES:= \
- test.S \
- testmain.c
- LOCAL_MODULE := testA
- include $(BUILD_EXECUTABLE)
- //result
- t=-20 ret=1
- t=-19 ret=1
- t=-18 ret=1
- t=-17 ret=1
- t=-16 ret=1
- t=-15 ret=1
- t=-14 ret=1
- t=-13 ret=1
- t=-12 ret=1
- t=-11 ret=1
- t=-10 ret=1
- t=-9 ret=1
- t=-8 ret=1
- t=-7 ret=1
- t=-6 ret=1
- t=-5 ret=1
- t=-4 ret=1
- t=-3 ret=1
- t=-2 ret=1
- t=-1 ret=1
- t=0 ret=0
- t=1 ret=0
- t=2 ret=0
- t=3 ret=0
- t=4 ret=0
- t=5 ret=0
- t=6 ret=0
- t=7 ret=0
- t=8 ret=0
- t=9 ret=0
- t=10 ret=0
- t=11 ret=0
- t=12 ret=1
- t=13 ret=1
- t=14 ret=1
- t=15 ret=1
- t=16 ret=1
- t=17 ret=1
- t=18 ret=1
- t=19 ret=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement