about summary refs log tree commit diff stats
path: root/subx/teensy
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2018-06-27 22:58:08 -0700
committerKartik K. Agaram <vc@akkartik.com>2018-06-27 22:58:08 -0700
commit5cce54ebf3088b0411e4026de0545f3f9eb01828 (patch)
treeecc08ed4eb1dd593789961291308984d6ea63cce /subx/teensy
parent582875bf3ae0a9e266fe9b49b93b8b8e1748c918 (diff)
downloadmu-5cce54ebf3088b0411e4026de0545f3f9eb01828.tar.gz
4280 - fix test program to use subx instructions
I don't know how to tell nasm to generate an imm32. It's a minor stepping-stone
anyway; just emit the machine code directly.
Diffstat (limited to 'subx/teensy')
-rwxr-xr-xsubx/teensy/test5bin91 -> 99 bytes
-rw-r--r--subx/teensy/test5.s11
2 files changed, 7 insertions, 4 deletions
diff --git a/subx/teensy/test5 b/subx/teensy/test5
index da1c8cd6..a67a5299 100755
--- a/subx/teensy/test5
+++ b/subx/teensy/test5
Binary files differdiff --git a/subx/teensy/test5.s b/subx/teensy/test5.s
index 3049615a..54a79846 100644
--- a/subx/teensy/test5.s
+++ b/subx/teensy/test5.s
@@ -35,9 +35,12 @@ phdr:                                                 ; Elf32_Phdr
 phdrsize  equ  $ - phdr
 
 _start:
-  mov     bl, 42
-  xor     eax, eax
-  inc     eax
-  int     0x80
+  mov ebx, 42
+  xor eax, eax
+  ; add eax, 0x00000001
+    db 0x81  ; op
+    db 0xc0  ; modr/m
+    dd 0x00000001  ; imm32 operand
+  int 0x80
 
 filesize      equ     $ - $$
ests/functionaltests.c?id=1f56c12377f15ac4892f7f72eb31be6bf084061e'>^
e1e0fda8 ^
97c5072f ^
52e2917b ^

97c5072f ^


e295a474 ^
377a63d0 ^
























373f47c7 ^
52e2917b ^
6303e0e2 ^


377a63d0 ^




































69ac8097 ^


e1e0fda8 ^

97c5072f ^



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107












                         

                       
                          
                         
                         
                              
                          
                        
                          
                     
                            
 

                                                                                            


                                  
 
























                                                                          
 
                                     


                                                




































                                                                                 


                                                                                

                                                



                                
#include <stdarg.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <sys/stat.h>

#include "config.h"

#include "proftest.h"
#include "test_connect.h"
#include "test_ping.h"
#include "test_rooms.h"
#include "test_presence.h"
#include "test_message.h"
#include "test_carbons.h"
#include "test_chat_session.h"
#include "test_receipts.h"
#include "test_roster.h"
#include "test_software.h"
#include "test_muc.h"
#include "test_disconnect.h"

#define PROF_FUNC_TEST(test) unit_test_setup_teardown(test, init_prof_test, close_prof_test)

int main(int argc, char* argv[]) {

    const UnitTest all_tests[] = {

        PROF_FUNC_TEST(connect_jid_requests_roster),
        PROF_FUNC_TEST(connect_jid_sends_presence_after_receiving_roster),
        PROF_FUNC_TEST(connect_jid_requests_bookmarks),
        PROF_FUNC_TEST(connect_bad_password),
        PROF_FUNC_TEST(connect_shows_presence_updates),

        PROF_FUNC_TEST(ping_multiple),
        PROF_FUNC_TEST(ping_responds),

        PROF_FUNC_TEST(rooms_query),

        PROF_FUNC_TEST(presence_away),
        PROF_FUNC_TEST(presence_away_with_message),
        PROF_FUNC_TEST(presence_online),
        PROF_FUNC_TEST(presence_online_with_message),
        PROF_FUNC_TEST(presence_xa),
        PROF_FUNC_TEST(presence_xa_with_message),
        PROF_FUNC_TEST(presence_dnd),
        PROF_FUNC_TEST(presence_dnd_with_message),
        PROF_FUNC_TEST(presence_chat),
        PROF_FUNC_TEST(presence_chat_with_message),
        PROF_FUNC_TEST(presence_set_priority),
        PROF_FUNC_TEST(presence_includes_priority),
        PROF_FUNC_TEST(presence_received),
        PROF_FUNC_TEST(presence_missing_resource_defaults),

        PROF_FUNC_TEST(message_send),
        PROF_FUNC_TEST(message_receive_console),
        PROF_FUNC_TEST(message_receive_chatwin),

        PROF_FUNC_TEST(sends_message_to_barejid_when_contact_offline),
        PROF_FUNC_TEST(sends_message_to_barejid_when_contact_online),
        PROF_FUNC_TEST(sends_message_to_fulljid_when_received_from_fulljid),
        PROF_FUNC_TEST(sends_subsequent_messages_to_fulljid),
        PROF_FUNC_TEST(resets_to_barejid_after_presence_received),
        PROF_FUNC_TEST(new_session_when_message_received_from_different_fulljid),

        PROF_FUNC_TEST(send_enable_carbons),
        PROF_FUNC_TEST(connect_with_carbons_enabled),
        PROF_FUNC_TEST(send_disable_carbons),
        PROF_FUNC_TEST(receive_carbon),
        PROF_FUNC_TEST(receive_self_carbon),

        PROF_FUNC_TEST(send_receipt_request),
        PROF_FUNC_TEST(send_receipt_on_request),
        PROF_FUNC_TEST(sends_new_item),
        PROF_FUNC_TEST(sends_new_item_nick),
        PROF_FUNC_TEST(sends_remove_item),
        PROF_FUNC_TEST(sends_nick_change),

        PROF_FUNC_TEST(send_software_version_request),
        PROF_FUNC_TEST(display_software_version_result),
        PROF_FUNC_TEST(shows_message_when_software_version_error),
        PROF_FUNC_TEST(display_software_version_result_when_from_domainpart),
        PROF_FUNC_TEST(show_message_in_chat_window_when_no_resource),
        PROF_FUNC_TEST(display_software_version_result_in_chat),

        PROF_FUNC_TEST(sends_room_join),
        PROF_FUNC_TEST(sends_room_join_with_default_muc_service),
        PROF_FUNC_TEST(sends_room_join_with_nick),
        PROF_FUNC_TEST(sends_room_join_with_password),
        PROF_FUNC_TEST(sends_room_join_with_nick_and_password),
        PROF_FUNC_TEST(shows_role_and_affiliation_on_join),
        PROF_FUNC_TEST(shows_subject_on_join),
        PROF_FUNC_TEST(shows_history_message),
        PROF_FUNC_TEST(shows_occupant_join),
        PROF_FUNC_TEST(shows_message),
        PROF_FUNC_TEST(shows_all_messages_in_console_when_window_not_focussed),
        PROF_FUNC_TEST(shows_first_message_in_console_when_window_not_focussed),
        PROF_FUNC_TEST(shows_no_message_in_console_when_window_not_focussed),

        PROF_FUNC_TEST(disconnect_ends_session),
    };

    return run_tests(all_tests);
}