Advertisement
goroh_kun

SH-01Dのshlcdc_sqe_event_unsubscribeのパラメータチェック検証結果

Feb 7th, 2012
506
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. // test.S
  2. .global shlcdc_sqe_event_unsubscribe
  3. shlcdc_sqe_event_unsubscribe:
  4. MOV R12, SP
  5. STMFD SP!, {R4,R5,R11,R12,LR,PC}
  6. SUB R11, R12, #4
  7. CMP R0, #11
  8. MOV R4, R0
  9. MOV R5, R1
  10. MOVHI R0, #1
  11. LDMHIFD SP, {R4,R5,R11,SP,PC}
  12. MOV R0, #0
  13. LDMFD SP, {R4,R5,R11,SP,PC}
  14.  
  15.  
  16. //testmain.c
  17. #include <stdio.h>
  18.  
  19. int shlcdc_sqe_event_unsubscribe(int t);
  20. void main(void)
  21. {
  22. int ret, t;
  23. for(t=-20; t<20; t++){
  24. ret = shlcdc_sqe_event_unsubscribe(t);
  25. printf("t=%d ret=%d\n", t, ret);
  26. }
  27. }
  28.  
  29. //Android.mk
  30. LOCAL_PATH:= $(call my-dir)
  31.  
  32. include $(CLEAR_VARS)
  33. LOCAL_SRC_FILES:= \
  34. test.S \
  35. testmain.c
  36. LOCAL_MODULE := testA
  37. include $(BUILD_EXECUTABLE)
  38.  
  39. //result
  40. t=-20 ret=1
  41. t=-19 ret=1
  42. t=-18 ret=1
  43. t=-17 ret=1
  44. t=-16 ret=1
  45. t=-15 ret=1
  46. t=-14 ret=1
  47. t=-13 ret=1
  48. t=-12 ret=1
  49. t=-11 ret=1
  50. t=-10 ret=1
  51. t=-9 ret=1
  52. t=-8 ret=1
  53. t=-7 ret=1
  54. t=-6 ret=1
  55. t=-5 ret=1
  56. t=-4 ret=1
  57. t=-3 ret=1
  58. t=-2 ret=1
  59. t=-1 ret=1
  60. t=0 ret=0
  61. t=1 ret=0
  62. t=2 ret=0
  63. t=3 ret=0
  64. t=4 ret=0
  65. t=5 ret=0
  66. t=6 ret=0
  67. t=7 ret=0
  68. t=8 ret=0
  69. t=9 ret=0
  70. t=10 ret=0
  71. t=11 ret=0
  72. t=12 ret=1
  73. t=13 ret=1
  74. t=14 ret=1
  75. t=15 ret=1
  76. t=16 ret=1
  77. t=17 ret=1
  78. t=18 ret=1
  79. t=19 ret=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement