Dataset Viewer
Auto-converted to Parquet Duplicate
max_stars_repo_path
stringlengths
4
186
max_stars_repo_name
stringlengths
7
73
max_stars_count
float64
0
14.7k
id
stringlengths
5
7
text
stringlengths
10
753k
lang
stringclasses
1 value
aws-cpp-sdk-glue/include/aws/glue/model/StatementOutput.h
Nexuscompute/aws-sdk-cpp
1
451895
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/glue/Glue_EXPORTS.h> #include <aws/glue/model/StatementOutputData.h> #include <aws/glue/model/StatementState.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <aws/core/utils/memory/stl/AWSVector.h> #include <utility> namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Glue { namespace Model { /** * <p>The code execution output in JSON format.</p><p><h3>See Also:</h3> <a * href="http://docs.aws.amazon.com/goto/WebAPI/glue-2017-03-31/StatementOutput">AWS * API Reference</a></p> */ class AWS_GLUE_API StatementOutput { public: StatementOutput(); StatementOutput(Aws::Utils::Json::JsonView jsonValue); StatementOutput& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** * <p>The code execution output.</p> */ inline const StatementOutputData& GetData() const{ return m_data; } /** * <p>The code execution output.</p> */ inline bool DataHasBeenSet() const { return m_dataHasBeenSet; } /** * <p>The code execution output.</p> */ inline void SetData(const StatementOutputData& value) { m_dataHasBeenSet = true; m_data = value; } /** * <p>The code execution output.</p> */ inline void SetData(StatementOutputData&& value) { m_dataHasBeenSet = true; m_data = std::move(value); } /** * <p>The code execution output.</p> */ inline StatementOutput& WithData(const StatementOutputData& value) { SetData(value); return *this;} /** * <p>The code execution output.</p> */ inline StatementOutput& WithData(StatementOutputData&& value) { SetData(std::move(value)); return *this;} /** * <p>The execution count of the output.</p> */ inline int GetExecutionCount() const{ return m_executionCount; } /** * <p>The execution count of the output.</p> */ inline bool ExecutionCountHasBeenSet() const { return m_executionCountHasBeenSet; } /** * <p>The execution count of the output.</p> */ inline void SetExecutionCount(int value) { m_executionCountHasBeenSet = true; m_executionCount = value; } /** * <p>The execution count of the output.</p> */ inline StatementOutput& WithExecutionCount(int value) { SetExecutionCount(value); return *this;} /** * <p>The status of the code execution output.</p> */ inline const StatementState& GetStatus() const{ return m_status; } /** * <p>The status of the code execution output.</p> */ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** * <p>The status of the code execution output.</p> */ inline void SetStatus(const StatementState& value) { m_statusHasBeenSet = true; m_status = value; } /** * <p>The status of the code execution output.</p> */ inline void SetStatus(StatementState&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** * <p>The status of the code execution output.</p> */ inline StatementOutput& WithStatus(const StatementState& value) { SetStatus(value); return *this;} /** * <p>The status of the code execution output.</p> */ inline StatementOutput& WithStatus(StatementState&& value) { SetStatus(std::move(value)); return *this;} /** * <p>The name of the error in the output.</p> */ inline const Aws::String& GetErrorName() const{ return m_errorName; } /** * <p>The name of the error in the output.</p> */ inline bool ErrorNameHasBeenSet() const { return m_errorNameHasBeenSet; } /** * <p>The name of the error in the output.</p> */ inline void SetErrorName(const Aws::String& value) { m_errorNameHasBeenSet = true; m_errorName = value; } /** * <p>The name of the error in the output.</p> */ inline void SetErrorName(Aws::String&& value) { m_errorNameHasBeenSet = true; m_errorName = std::move(value); } /** * <p>The name of the error in the output.</p> */ inline void SetErrorName(const char* value) { m_errorNameHasBeenSet = true; m_errorName.assign(value); } /** * <p>The name of the error in the output.</p> */ inline StatementOutput& WithErrorName(const Aws::String& value) { SetErrorName(value); return *this;} /** * <p>The name of the error in the output.</p> */ inline StatementOutput& WithErrorName(Aws::String&& value) { SetErrorName(std::move(value)); return *this;} /** * <p>The name of the error in the output.</p> */ inline StatementOutput& WithErrorName(const char* value) { SetErrorName(value); return *this;} /** * <p>The error value of the output.</p> */ inline const Aws::String& GetErrorValue() const{ return m_errorValue; } /** * <p>The error value of the output.</p> */ inline bool ErrorValueHasBeenSet() const { return m_errorValueHasBeenSet; } /** * <p>The error value of the output.</p> */ inline void SetErrorValue(const Aws::String& value) { m_errorValueHasBeenSet = true; m_errorValue = value; } /** * <p>The error value of the output.</p> */ inline void SetErrorValue(Aws::String&& value) { m_errorValueHasBeenSet = true; m_errorValue = std::move(value); } /** * <p>The error value of the output.</p> */ inline void SetErrorValue(const char* value) { m_errorValueHasBeenSet = true; m_errorValue.assign(value); } /** * <p>The error value of the output.</p> */ inline StatementOutput& WithErrorValue(const Aws::String& value) { SetErrorValue(value); return *this;} /** * <p>The error value of the output.</p> */ inline StatementOutput& WithErrorValue(Aws::String&& value) { SetErrorValue(std::move(value)); return *this;} /** * <p>The error value of the output.</p> */ inline StatementOutput& WithErrorValue(const char* value) { SetErrorValue(value); return *this;} /** * <p>The traceback of the output.</p> */ inline const Aws::Vector<Aws::String>& GetTraceback() const{ return m_traceback; } /** * <p>The traceback of the output.</p> */ inline bool TracebackHasBeenSet() const { return m_tracebackHasBeenSet; } /** * <p>The traceback of the output.</p> */ inline void SetTraceback(const Aws::Vector<Aws::String>& value) { m_tracebackHasBeenSet = true; m_traceback = value; } /** * <p>The traceback of the output.</p> */ inline void SetTraceback(Aws::Vector<Aws::String>&& value) { m_tracebackHasBeenSet = true; m_traceback = std::move(value); } /** * <p>The traceback of the output.</p> */ inline StatementOutput& WithTraceback(const Aws::Vector<Aws::String>& value) { SetTraceback(value); return *this;} /** * <p>The traceback of the output.</p> */ inline StatementOutput& WithTraceback(Aws::Vector<Aws::String>&& value) { SetTraceback(std::move(value)); return *this;} /** * <p>The traceback of the output.</p> */ inline StatementOutput& AddTraceback(const Aws::String& value) { m_tracebackHasBeenSet = true; m_traceback.push_back(value); return *this; } /** * <p>The traceback of the output.</p> */ inline StatementOutput& AddTraceback(Aws::String&& value) { m_tracebackHasBeenSet = true; m_traceback.push_back(std::move(value)); return *this; } /** * <p>The traceback of the output.</p> */ inline StatementOutput& AddTraceback(const char* value) { m_tracebackHasBeenSet = true; m_traceback.push_back(value); return *this; } private: StatementOutputData m_data; bool m_dataHasBeenSet; int m_executionCount; bool m_executionCountHasBeenSet; StatementState m_status; bool m_statusHasBeenSet; Aws::String m_errorName; bool m_errorNameHasBeenSet; Aws::String m_errorValue; bool m_errorValueHasBeenSet; Aws::Vector<Aws::String> m_traceback; bool m_tracebackHasBeenSet; }; } // namespace Model } // namespace Glue } // namespace Aws
c
Thread/06thread.c
aniruddha2000/kacha-badam
0
565873
/* Passing argument to thread */ #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> int primes[10] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29}; void *routine(void *arg) { int index = *(int *)arg; int sum = 0; for (int i = 0; i < 5; i++) { sum += primes[index + i]; } printf("Local sum = %d\n", sum); *(int *)arg = sum; return arg; } int main(int argc, char const *argv[]) { pthread_t th[2]; int i; for (i = 0; i < 2; i++) { int *a = malloc(sizeof(int)); *a = i * 5; if (pthread_create(&th[i], NULL, &routine, a) != 0) { perror("Failed to create thread"); } } int globalSum = 0; for (i = 0; i < 2; i++) { int *r; if (pthread_join(th[i], (void **)&r) != 0) { perror("Failed to join thread"); } globalSum += *r; free(r); } printf("Global sum = %d\n", globalSum); return 0; }
c
include/BoardMulti.h
dawidd6/qtictactoe
2
4952240
#pragma once class BoardMulti : public AbstractBoard { private: SetupConnection *setup_connection; Window *w; Game *g; AbstractSymbol *symbol_my; AbstractSymbol *symbol_enemy; QTcpSocket socket; QStatusBar statusbar; QString response; QChar symbol_char_my; QChar symbol_char_enemy; volatile int turn; public: BoardMulti(Window *window, Game *game); ~BoardMulti(); void makeMove(const int &x, const int &y, const AbstractSymbol *symbol, QChar symbol_char, bool isMyTurn, QString message); void handleRead(); void handleConnection(); void handleDisconnection(); void handleRandom(); virtual void handleRestart(); };
c
IN100/tri_fusion.c
emeric75/uvsq_licence
0
1841491
#include <uvsqgraphics.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 16 #define MAX 100 int T[N]; void init(){ for(int i=0; i<N; i++){ T[i] = alea_int(MAX-10)+10; } } void disp(){ for(int i=0; i<N; i++){ write_int(T[i]);write_text(" "); if(i%20 == 19){ writeln(); } } writeln(); } void disp_tri(int min, int max){ for(int i=0; i<N; i++){ write_int(T[i]);write_text(" "); } write_text(" | | ");write_int(min);write_text(" ");write_int(max); writeln(); } void disp_ech(int min, int max){ for(int i=0; i<N; i++){ write_int(T[i]);write_text(" "); } write_text(" | | ");write_int(min);write_text(" ");write_int(max);write_text(" ech"); writeln(); } void echange(int i, int j){ int tmp; tmp = T[i]; T[i] = T[j]; T[j] = tmp; } int indice_du_plus_grand(int min, int max){ int maxind=min; for(int i =min; i<max;i++){ if(T[i]>T[maxind])maxind=i; } return maxind; } void tri_selection(int min, int max){ for(int i = 0; i<max-min; i++){ echange(indice_du_plus_grand(min, max-i), max-i-1); //disp(); } } void tri_fusion(int min,int max){ //condition d'arrêt if(max-min==0){ return; }else if(max-min==1){ if(T[max]<T[min]) echange(min,max); return; } //disp(min,max); //séparation en deux sous-tableaux et tri int mil = (min+max)/2; tri_fusion(min,mil); tri_fusion(mil,max); //FUUUUUUUUUUSION int i,c1=0,c2=0; int temptab[N]; for(i = min; i<max; i++){ if(T[min+c1]<T[mil+c2] && min+c1<mil){ temptab[i] = T[min+c1]; c1++; }else{ temptab[i] = T[mil+c2]; c2++; } } for(i = min; i<max; i++){ T[i] = temptab[i]; } disp_ech(min,max); } int main(){ init_graphics(800,600); clock_t t1,t2,t3,t4; init(); disp(); write_text("fusion...");writeln(); t1=clock(); tri_fusion(0,N); t2=clock(); printf("Temps ecoule fusion : %lf\n", (double)(t2-t1)/(double)CLOCKS_PER_SEC); disp(); /*init(); //disp(); write_text("selection...");writeln(); t3=clock(); tri_selection(0,N); t4=clock(); printf("Temps ecoule selection : %lf\n", (double)(t4-t3)/(double)CLOCKS_PER_SEC); //disp();*/ wait_escape(); }
c
test/e2e/test_master/wxWidgets/include/wx/generic/activityindicator.h
BlueCannonBall/cppparser
0
4800467
/////////////////////////////////////////////////////////////////////////////// // Name: wx/generic/activityindicator.h // Purpose: Declaration of wxActivityIndicatorGeneric. // Author: <NAME> // Created: 2015-03-06 // Copyright: (c) 2015 <NAME> <<EMAIL>> // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_ACTIVITYINDICATOR_H_ # define _WX_GENERIC_ACTIVITYINDICATOR_H_ # ifndef wxHAS_NATIVE_ACTIVITYINDICATOR // This is the only implementation we have, so call it accordingly. # define wxActivityIndicatorGeneric wxActivityIndicator # endif // ---------------------------------------------------------------------------- // wxActivityIndicatorGeneric: built-in generic implementation. // ---------------------------------------------------------------------------- class WXDLLIMPEXP_ADV wxActivityIndicatorGeneric : public wxActivityIndicatorBase { public: wxActivityIndicatorGeneric() { m_impl = NULL; } explicit wxActivityIndicatorGeneric(wxWindow* parent, wxWindowID winid = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxActivityIndicatorNameStr) { m_impl = NULL; Create(parent, winid, pos, size, style, name); } bool Create(wxWindow* parent, wxWindowID winid = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxActivityIndicatorNameStr); virtual ~wxActivityIndicatorGeneric(); void Start() override; void Stop() override; bool IsRunning() const override; protected: wxSize DoGetBestClientSize() const override; private: class wxActivityIndicatorImpl* m_impl; # ifndef wxHAS_NATIVE_ACTIVITYINDICATOR wxDECLARE_DYNAMIC_CLASS(wxActivityIndicator); # endif }; #endif
c
LYLOptionPickerDemo/LYLOptionPickerDemo/LYLOptionPicker/LYLOptionPicker.h
LiuYulei001/LYLOptionPicker
1
1832317
// // LYLOptionPicker.h // LYLOptionPickerDemo // // Created by Rainy on 2017/12/12. // Copyright © 2017年 Rainy. All rights reserved. // #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> @interface LYLOptionPicker : NSObject typedef void(^DetermineChoose)(NSArray *indexes,id selectedItems); + (void)showOptionPickerInView:(UIView *)view dataSource:(NSArray <NSArray <NSString *>*>*)dataSource determineChoose:(DetermineChoose)determineChoose; @end
c
external/cpp/mgtest/test_ocr.h
asedl/XpaDemo
5
4450997
#pragma once extern int testOcr(wchar_t* lpszImagefilename);
c
SoftwareRenderer/Source/Core/Utils.h
sunzedd/software-renderer
1
7767478
#pragma once namespace core { template <typename T> T clamp(T value, T min, T max) { return std::max(min, std::min(value, max)); } template <typename T> T clampNormalize(T value) { return clamp<T>(value, 0.0, 1.0); } } // namespace core
c
firmware/Inc/app.h
windsorschmidt/reflow
1
207662
#ifndef APP_INIT #define APP_INIT // #define NOBEEP #define APP_IPC_Q_SIZE 8 #define LOG_IPC_Q_SIZE 8 #define TEMP_IPC_Q_SIZE 8 #define OLED_IPC_Q_SIZE 8 #define SPEAKER_IPC_Q_SIZE 8 #define BUTTON_IPC_Q_SIZE 8 #define TIMER_IPC_Q_SIZE 8 #define BUTTON_ISR_Q_SIZE 4 #define TIMER_ISR_Q_SIZE 4 #define MSG_TIMER_1HZ_TICK 0x0001 #define MSG_TIMER_SPEAKER_TICK 0x0002 #define MSG_TEMP_TEMP 0x0101 #define MSG_TEMP_FAULT 0x0102 #define MSG_BUTTON_PREV 0x0201 #define MSG_BUTTON_SET 0x0202 #define MSG_BUTTON_NEXT 0x0203 #define MSG_BUTTON_PANIC 0x0204 #define MSG_TRIAC1_DUTY 0x0301 #define MSG_TRIAC2_DUTY 0x0302 #define MSG_TRIAC_MORE_POWER 0x0303 #define MSG_TRIAC_LESS_POWER 0x0304 #define MSG_BT_CONNECT 0x0401 #define MSG_BT_DISCONNECT 0x0402 #define MSG_REFLOW_START 0x0501 #define MSG_REFLOW_STOP 0x0502 #define MSG_REFLOW_STAGE 0x0503 #define MSG_REFLOW_RUNTIME 0x0504 #define MSG_PROFILE_TEMP 0x0601 #define MSG_SPEAKER_TEST 0x0701 #define MSG_SPEAKER_BEEP 0x0702 #define MSG_SPEAKER_ALERT 0x0703 void app_init(void); void app_task(void *params); #endif // APP_INIT
c
src/utils/bluetooth/inc/bluetooth_types.h
ddoyon92/brainflow
528
4743764
#pragma once enum class SocketBluetoothReturnCodes : int { STATUS_OK = 0, WSA_STARTUP_ERROR = 1, CREATE_SOCKET_ERROR = 2, CONNECT_ERROR = 3, WSA_ADDR_ERROR = 4, IOCTL_ERROR = 5, ANOTHER_DEVICE_IS_CREATED_ERROR = 6, DEVICE_IS_NOT_CREATED_ERROR = 7, UNIMPLEMENTED_ERROR = 8, GENERAL_ERROR = 9, WSA_LOOKUP_BEGIN_ERROR = 10 };
c
tests/openacc-users-group/NAS_SHOC_OpenACC_2.5/reference/ref_exact_rhs.c
passlab/accparser
0
2402388
#pragma acc update device (forcing)
c
eva/utest/test_vqec_utest_cli.c
wmanley/cisco-vqe-client
5
8075491
/* * Copyright (c) 2007-2010 by Cisco Systems, Inc. * All rights reserved. */ #include "test_vqec_utest_main.h" #include "test_vqec_utest_interposers.h" #include "../add-ons/include/CUnit/CUnit.h" #include "../add-ons/include/CUnit/Basic.h" #include "vam_util.h" #include "vqec_cli_register.h" #include "vqec_tuner.h" #include "vqec_lock_defs.h" #include "vqec_assert_macros.h" #include "vqec_tuner.h" #include "vqec_debug.h" #include "vqec_stream_output_thread_mgr.h" #include "vqec_syscfg.h" #include "vqec_gap_reporter.h" #include "vqec_cli.h" #include "vqec_pthread.h" #include "vqec_channel_api.h" #include "vqec_channel_private.h" extern void vqec_str_to_lower(char *outputString, char *inputString); extern int vqec_str_match(char *s, char *params[]); extern int vqec_check_args_for_help_char(char *argv[], int argc); extern void vqec_print_callback(struct vqec_cli_def *cli, char *string, int string_len); extern int vqec_cmd_show_tuner(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_show_channel(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_show_drop(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_show_error_repair(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_show_counters(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_show_debug(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_show_system_config(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_drop_interval(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_drop_percentage(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_drop_enable(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_drop_disable(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_error_repair_enable(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_error_repair_disable(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_tuner_bind(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_tuner_unbind(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_tuner_create(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_tuner_destroy(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_channel_update(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_update(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_clear_counters(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_channel_tr135(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_debug_func(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_proxy_igmp_join(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_stream_output(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_monitor_elog(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_monitor_outputsched_show(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_monitor_outputsched_off(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_monitor_outputsched_on(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_monitor_outputsched_reset (struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_error_repair_policer_enable(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_error_repair_policer_disable(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_error_repair_policer_rate(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_error_repair_policer_burst(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_show_fec(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_fec_enable(struct vqec_cli_def *cli, char *command,char *argv[], int argc); extern int vqec_cmd_fec_disable(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cli_help_func(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern int vqec_cmd_show_tech_support(struct vqec_cli_def *cli, char *command, char *argv[], int argc); extern vqec_chan_t * vqec_chan_find (in_addr_t ip, in_port_t port); /* * Unit tests for vqec_cli */ void *cli_handle = 0; int vqec_cli_port = 8181; in_addr_t vqec_cli_if_addr = INADDR_ANY; /* elog status report */ extern void status_report(void); void *vqec_utest_cli_thread(void* arg) { cli_handle = vqec_cli_startup(); vqec_cli_loop_wrapper(vqec_cli_port, vqec_cli_if_addr); return NULL; } int test_vqec_cli_init (void) { pthread_t vqec_cli_thread_id; vqec_tunerid_t deftuner; vqec_pthread_create(&vqec_cli_thread_id,vqec_utest_cli_thread, NULL); printf("please telnet to port %d to cover telnet session code...\n", vqec_cli_port); sleep(1); vqec_ifclient_init("data/cfg_test_all_params_valid.cfg"); vqec_stream_output_thread_mgr_module_init(); vqec_ifclient_tuner_create(&deftuner, "deftuner"); return 0; } int test_vqec_cli_clean (void) { vqec_stream_output_thread_mgr_module_deinit(); vqec_ifclient_deinit(); return 0; } static void test_vqec_cli_helper_funcs (void) { char *varlist[] = { "first", "second", "third", "fourth", "fifth", (char *)0 }; if(varlist); CU_ASSERT(vqec_str_match("first", varlist) == 0); CU_ASSERT(vqec_str_match("second", varlist) == 1); CU_ASSERT(vqec_str_match("THird", varlist) == 2); CU_ASSERT(vqec_str_match("four", varlist) == 3); CU_ASSERT(vqec_str_match("fiFth", varlist) == 4); CU_ASSERT(vqec_str_match("dfirst", varlist) == -1); CU_ASSERT(vqec_str_match("fi", varlist) == VQEC_CLI_ERROR); CU_ASSERT(vqec_str_match(NULL, varlist) == VQEC_CLI_ERROR); char *argv[] = {"arg1","arg2"}; char *argv2[] = {"ar?"}; CU_ASSERT(vqec_check_args_for_help_char(argv, 2) == FALSE); CU_ASSERT(vqec_check_args_for_help_char(argv2, 1) == TRUE); vqec_print_callback(cli_handle, "hello world!", strlen("hello world!")); int test_cli_fd; test_cli_fd = vqec_get_cli_fd(cli_handle); CU_ASSERT(test_cli_fd); } static void test_vqec_cli_show_cmds (void) { int cmdstat = 0; char *args1[] = { }; char *args2[] = { "deftuner" }; char *args3[] = { "deftuner?" }; char *args4[] = { "invalidtuner" }; char *args5[] = { "name", "deftuner" }; char *args6[] = { "cumulative" }; char *shtargs1[] = { "all" }; char *shtargs2[] = { "name", "deftuner" }; char *shtargs3[] = { "name", "deftuner?" }; char *shtargs4[] = { "name", "invalidtuner" }; char *shtargs5[] = { "join-delay" }; char *shcargs1[] = { "counters" }; char *shcargs2[] = { "counters", "all" }; char *shcargs3[] = { "counters", "url" }; char *shcargs4[] = { "config" }; char *shcargs5[] = { "config" , "all" }; char *shcargs6[] = { "config", "url" }; char *shcargs7[] = { "counters", "all", "cumulative" }; /* * The vqec_cmd_show_system_config() function requires that the array * arguments be writable, because they are passed to strtok_r(). * So the arrays of string literals cannot be used, and an array of * pointers to writable memory is needed instead. Since this an issue * for just one unit test, the variables below will be used. */ char deftuner[] = "deftuner"; char *args2_writable[] = { deftuner }; /* show tuner */ cmdstat = vqec_cmd_show_tuner(cli_handle, "show tuner", shtargs1, 1); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cmd_show_tuner(cli_handle, "show tuner", shtargs2, 2); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cmd_show_tuner(cli_handle, "show tuner", shtargs3, 2); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_show_tuner(cli_handle, "show tuner", shtargs4, 2); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_show_tuner(cli_handle, "show tuner", shtargs5, 1); CU_ASSERT(cmdstat == VQEC_CLI_OK); /* show channels */ cmdstat = vqec_cmd_show_channel(cli_handle, "show channel", args1, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cmd_show_channel(cli_handle, "show channel", args2, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_show_channel(cli_handle, "show channel", shcargs1, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_show_channel(cli_handle, "show channel", shcargs2, 2); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cmd_show_channel(cli_handle, "show channel", shcargs3, 2); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_show_channel(cli_handle, "show channel", shcargs4, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_show_channel(cli_handle, "show channel", shcargs5, 2); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cmd_show_channel(cli_handle, "show channel", shcargs6, 2); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_show_channel(cli_handle, "show channel", shcargs7, 3); CU_ASSERT(cmdstat == VQEC_CLI_OK); /* show drop */ cmdstat = vqec_cmd_show_drop(cli_handle, "show drop", args1, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cmd_show_drop(cli_handle, "show drop", args2, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); /* show error-repair */ cmdstat = vqec_cmd_show_error_repair(cli_handle, "show error_repair", args1, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cmd_show_error_repair(cli_handle, "show error_repair", args2, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); /*show fec */ cmdstat = vqec_cmd_show_fec(cli_handle, "show fec", args1, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cmd_show_fec(cli_handle, "show fec", args2, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); /* show counters */ cmdstat = vqec_cmd_show_counters(cli_handle, "show counters", args1, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cmd_show_counters(cli_handle, "show counters", args5, 2); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cmd_show_counters(cli_handle, "show counters", args3, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_show_counters(cli_handle, "show counters", args4, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_show_counters(cli_handle, "show counters", args6, 1); CU_ASSERT(cmdstat == VQEC_CLI_OK); /* show debug */ cmdstat = vqec_cmd_show_debug(cli_handle, "show debug", args1, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cmd_show_debug(cli_handle, "show debug", args2, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); /* show system-config */ cmdstat = vqec_cmd_show_system_config(cli_handle, "show system-config", args1, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cmd_show_system_config(cli_handle, "show system-config", args2_writable, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); /* show tech-support */ cmdstat = vqec_cmd_show_tech_support(cli_handle, "show tech-support", args1, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); /* Pass some argument to see the function return an error */ cmdstat = vqec_cmd_show_tech_support(cli_handle, "show tech-support", args2, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); } static void test_vqec_cli_global_cmds (void) { int cmdstat = 0; uint32_t rate, burst; vqec_dp_drop_sim_state_t state; boolean policer_enabled; char *args11[] = { }; char *args12[] = { "?" }; char *args31[] = { "1" }; char *args32[] = { "1", "2" }; /* error-repair */ CU_ASSERT(vqec_get_error_repair(NULL)); /* enabled by default */ cmdstat = vqec_cmd_error_repair_disable(cli_handle, "error-repair disable", args11, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(!vqec_get_error_repair(NULL)); cmdstat = vqec_cmd_error_repair_enable(cli_handle, "error-repair enable", args12, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); CU_ASSERT(!vqec_get_error_repair(NULL)); cmdstat = vqec_cmd_error_repair_enable(cli_handle, "error-repair enable", args11, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(vqec_get_error_repair(NULL)); cmdstat = vqec_cmd_error_repair_disable(cli_handle, "error-repair disable", args12, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); CU_ASSERT(vqec_get_error_repair(NULL)); /* fec */ boolean fec; /* enabled by default */ CU_ASSERT(vqec_dp_get_fec(&fec, NULL) == VQEC_DP_ERR_OK); cmdstat = vqec_cmd_fec_disable(cli_handle, "fec disable", args11, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(vqec_dp_get_fec(&fec, NULL) == VQEC_DP_ERR_OK); cmdstat = vqec_cmd_fec_enable(cli_handle, "fec enable", args12, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); CU_ASSERT(vqec_dp_get_fec(&fec, NULL) == VQEC_DP_ERR_OK); cmdstat = vqec_cmd_fec_enable(cli_handle, "fec enable", args11, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(vqec_dp_get_fec(&fec, NULL) == VQEC_DP_ERR_OK); cmdstat = vqec_cmd_fec_disable(cli_handle, "fec disable", args12, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); CU_ASSERT(vqec_dp_get_fec(&fec, NULL) == VQEC_DP_ERR_OK); /* error repair policer enable */ cmdstat = vqec_cmd_error_repair_policer_enable( cli_handle, "error-repair policer enable", args12, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_error_repair_policer_enable( cli_handle, "error-repair policer enable", args11, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); vqec_error_repair_policer_parameters_get(&policer_enabled, NULL, NULL, NULL, NULL, NULL); CU_ASSERT(policer_enabled); /* error repair policer disable */ cmdstat = vqec_cmd_error_repair_policer_disable( cli_handle, "error-repair policer disable", args12, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_error_repair_policer_disable( cli_handle, "error-repair policer disable", args11, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); vqec_error_repair_policer_parameters_get(&policer_enabled, NULL, NULL, NULL, NULL, NULL); CU_ASSERT(!policer_enabled); /* error repair policer rate */ cmdstat = vqec_cmd_error_repair_policer_rate( cli_handle, "error-repair policer rate", args11, 0); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_error_repair_policer_rate( cli_handle, "error-repair policer rate", args12, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_error_repair_policer_rate (cli_handle, "error-repair policer rate", args31, 1); CU_ASSERT(cmdstat == VQEC_CLI_OK); vqec_error_repair_policer_parameters_get(&policer_enabled, NULL, &rate, NULL, &burst, NULL); CU_ASSERT_EQUAL(rate, 1); /* error repair policer burst */ cmdstat = vqec_cmd_error_repair_policer_burst( cli_handle, "error-repair policer burst", args11, 0); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_error_repair_policer_burst( cli_handle, "error-repair policer burst", args12, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_error_repair_policer_burst( cli_handle, "error-repair policer burst", args31, 1); CU_ASSERT(cmdstat == VQEC_CLI_OK); vqec_error_repair_policer_parameters_get(&policer_enabled, NULL, NULL, NULL, &burst, NULL); CU_ASSERT_EQUAL(burst, 1); /* drop default settings */ memset(&state, 0, sizeof(state)); vqec_dp_get_drop_params(VQEC_DP_INPUT_STREAM_TYPE_PRIMARY, &state); CU_ASSERT(!state.en); /* disabled by default */ memset(&state, 0, sizeof(state)); vqec_dp_get_drop_params(VQEC_DP_INPUT_STREAM_TYPE_REPAIR, &state); CU_ASSERT(!state.en); /* disabled by default */ /* drop session {primary | repair} {enable | disable} */ cmdstat = vqec_cmd_drop_enable(cli_handle, "drop session primary enable", args11, 0); vqec_dp_get_drop_params(VQEC_DP_INPUT_STREAM_TYPE_PRIMARY, &state); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(state.en); cmdstat = vqec_cmd_drop_disable(cli_handle, "drop session primary disable", args11, 0); vqec_dp_get_drop_params(VQEC_DP_INPUT_STREAM_TYPE_PRIMARY, &state); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(!state.en); cmdstat = vqec_cmd_drop_enable(cli_handle, "drop session repair enable", args11, 0); vqec_dp_get_drop_params(VQEC_DP_INPUT_STREAM_TYPE_REPAIR, &state); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(state.en); cmdstat = vqec_cmd_drop_disable(cli_handle, "drop session repair disable", args11, 0); vqec_dp_get_drop_params(VQEC_DP_INPUT_STREAM_TYPE_REPAIR, &state); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(!state.en); /* drop { enable | disable */ cmdstat = vqec_cmd_drop_enable(cli_handle, "drop enable", args11, 0); vqec_dp_get_drop_params(VQEC_DP_INPUT_STREAM_TYPE_PRIMARY, &state); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(state.en); cmdstat = vqec_cmd_drop_enable(cli_handle, "drop enable", args11, 0); vqec_dp_get_drop_params(VQEC_DP_INPUT_STREAM_TYPE_PRIMARY, &state); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(state.en); cmdstat = vqec_cmd_drop_disable(cli_handle, "drop disable", args12, 1); vqec_dp_get_drop_params(VQEC_DP_INPUT_STREAM_TYPE_PRIMARY, &state); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); CU_ASSERT(state.en); cmdstat = vqec_cmd_drop_disable(cli_handle, "drop disable", args11, 0); vqec_dp_get_drop_params(VQEC_DP_INPUT_STREAM_TYPE_PRIMARY, &state); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(!state.en); cmdstat = vqec_cmd_drop_enable(cli_handle, "drop enable", args12, 1); vqec_dp_get_drop_params(VQEC_DP_INPUT_STREAM_TYPE_PRIMARY, &state); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); CU_ASSERT(!state.en); /* drop-interval */ vqec_dp_get_drop_params(VQEC_DP_INPUT_STREAM_TYPE_PRIMARY, &state); CU_ASSERT(state.desc.num_cont_drops == 0); /* default */ CU_ASSERT(state.desc.interval_span == 0); /* default */ cmdstat = vqec_cmd_drop_interval(cli_handle, "drop interval", args11, 0); vqec_dp_get_drop_params(VQEC_DP_INPUT_STREAM_TYPE_PRIMARY, &state); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); CU_ASSERT(state.desc.num_cont_drops == 0); CU_ASSERT(state.desc.interval_span == 0); cmdstat = vqec_cmd_drop_interval(cli_handle, "drop interval", args12, 1); vqec_dp_get_drop_params(VQEC_DP_INPUT_STREAM_TYPE_PRIMARY, &state); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); CU_ASSERT(state.desc.num_cont_drops == 0); CU_ASSERT(state.desc.interval_span == 0); cmdstat = vqec_cmd_drop_interval(cli_handle, "drop interval", args31, 1); vqec_dp_get_drop_params(VQEC_DP_INPUT_STREAM_TYPE_PRIMARY, &state); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); CU_ASSERT(state.desc.num_cont_drops == 0); CU_ASSERT(state.desc.interval_span == 0); cmdstat = vqec_cmd_drop_interval(cli_handle, "drop interval", args32, 2); vqec_dp_get_drop_params(VQEC_DP_INPUT_STREAM_TYPE_PRIMARY, &state); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(state.desc.num_cont_drops == 1); CU_ASSERT(state.desc.interval_span == 2); /* drop-percentage */ CU_ASSERT(state.desc.drop_percent == 0); /* default */ cmdstat = vqec_cmd_drop_percentage(cli_handle, "drop percentage", args11, 0); vqec_dp_get_drop_params(VQEC_DP_INPUT_STREAM_TYPE_PRIMARY, &state); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); CU_ASSERT(state.desc.drop_percent == 0); cmdstat = vqec_cmd_drop_percentage(cli_handle, "drop percentage", args12, 1); vqec_dp_get_drop_params(VQEC_DP_INPUT_STREAM_TYPE_PRIMARY, &state); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); CU_ASSERT(state.desc.drop_percent == 0); cmdstat = vqec_cmd_drop_percentage(cli_handle, "drop percentage", args32, 2); vqec_dp_get_drop_params(VQEC_DP_INPUT_STREAM_TYPE_PRIMARY, &state); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); CU_ASSERT(state.desc.drop_percent == 0); cmdstat = vqec_cmd_drop_percentage(cli_handle, "drop percentage", args31, 1); vqec_dp_get_drop_params(VQEC_DP_INPUT_STREAM_TYPE_PRIMARY, &state); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(state.desc.drop_percent == 1); } static void test_vqec_cli_test_cmds (void) { int cmdstat = 0; char *args0[] = { }; char *args11[] = { "?" }; char *args12[] = { "invalidtuner" }; char *args13[] = { "deftuner" }; char *args14[] = { "newtuner" }; char *args21[] = { "deftuner", "url?" }; char *args22[] = { "deftuner", "udp://192.168.127.12:50000" }; char *args23[] = { "deftuner", "udp://172.16.58.3:50000" }; char *args24[] = { "deftuner", "udp://192.168.127.12:50000", "tr-135", "gmin", "2", "slmd", "3" }; char *args31[] = { "udp://192.168.127.12:50000", "gmin", "1", "slmd", "5" }; char *args32[] = { "udp://172.16.58.3:50000", "gmin", "1", "slmd", "5" }; char primary_dest_addr[INET_ADDRSTRLEN]; char *args_bind[] = {"deftuner", "chan-params", "list", /* er & rcc */ "primary-dest-addr", primary_dest_addr, "primary-dest-port", "60000", "primary-dest-rtcp-port", "60011", "primary-src-addr", "127.0.0.1", "primary-src-port", "32993", "primary-src-rtcp-port", "55001", "primary-payload-type", "96", "primary-bit-rate", "4000000", "primary-rtcp-sndr-bw", "53", "primary-rtcp-rcvr-bw", "530000", "primary-rtcp-per-rcvr-bw", "53", "fbt-addr", "127.0.0.1", "er_enable", "rcc_enable", "rtx-src-addr", "127.0.0.1", "rtx-src-port", "55002", "rtx-src-rtcp-port", "55003", "rtx-dest-addr", "0.0.0.0", "rtx-dest-port", "0", "rtx-dest-rtcp-port", "0", "rtx-payload-type", "99", "rtx-rtcp-sndr-bw", "53", "rtx-rtcp-rcvr-bw", "53"}; char *args_bind2[] = {"deftuner", "chan-params", "list", /* w/o er & rcc */ "primary-dest-addr", primary_dest_addr, "primary-dest-port", "60000", "primary-dest-rtcp-port", "60011", "primary-src-addr", "127.0.0.1", "primary-src-port", "32993", "primary-src-rtcp-port", "55001", "primary-payload-type", "96", "primary-bit-rate", "4000000", "primary-rtcp-sndr-bw", "53", "primary-rtcp-rcvr-bw", "530000", "primary-rtcp-per-rcvr-bw", "53", "fbt-addr", "127.0.0.1"}; /* args_update1 - invalid (src port supplied w/o src address) */ char *args_update1[] = {"primary-dest-addr", primary_dest_addr, "primary-dest-port", "60000", "primary-src-addr", "0.0.0.0", "primary-src-port", "32993", "fbt-addr", "127.0.0.1", "primary-src-rtcp-port", "56001", "rtx-src-addr", "127.0.0.1", "rtx-src-port", "56002", "rtx-src-rtcp-port", "56003"}; /* args_update2 - invalid (FBT addr and rtx src addr don't match) */ char *args_update2[] = {"primary-dest-addr", primary_dest_addr, "primary-dest-port", "60000", "primary-src-addr", "127.0.0.1", "primary-src-port", "32993", "fbt-addr", "127.0.0.1", "primary-src-rtcp-port", "56001", "rtx-src-addr", "0.0.0.0", "rtx-src-port", "56002", "rtx-src-rtcp-port", "56003"}; /* args_update3 - valid */ char *args_update3[] = {"primary-dest-addr", primary_dest_addr, "primary-dest-port", "60000", "primary-src-addr", "127.0.0.2", "primary-src-port", "32994", "fbt-addr", "127.0.0.3", "primary-src-rtcp-port", "56005", "rtx-src-addr", "127.0.0.3", "rtx-src-port", "56004", "rtx-src-rtcp-port", "56003"}; /* args_update4 - valid */ char *args_update4[] = {"primary-dest-addr", primary_dest_addr, "primary-dest-port", "60000", "primary-src-addr", "127.0.0.1", "primary-src-port", "32993", "fbt-addr", "127.0.0.1", "primary-src-rtcp-port", "56001"}; char *args_update_config1[] = {"file", "data/override_tags.txt", "type", "override"}; in_addr_t dst_ip, src_ip; uint16_t dst_port, src_port; vqec_chan_t *chan; /* tuner bind */ cmdstat = vqec_cmd_tuner_bind(cli_handle, "tuner bind", args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_tuner_bind(cli_handle, "tuner bind", args11, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_tuner_bind(cli_handle, "tuner bind", args12, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_tuner_bind(cli_handle, "tuner bind", args13, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_tuner_bind(cli_handle, "tuner bind", args21, 2); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_tuner_bind(cli_handle, "tuner bind", args22, 2); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cmd_tuner_bind(cli_handle, "tuner bind", args23, 2); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); /* tuner unbind */ cmdstat = vqec_cmd_tuner_unbind(cli_handle, "tuner unbind", args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_tuner_unbind(cli_handle, "tuner unbind", args11, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_tuner_unbind(cli_handle, "tuner unbind", args12, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_tuner_unbind(cli_handle, "tuner unbind", args13, 1); CU_ASSERT(cmdstat == VQEC_CLI_OK); /* tuner create */ cmdstat = vqec_cmd_tuner_create(cli_handle, "tuner create", args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_tuner_create(cli_handle, "tuner create", args11, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_tuner_create(cli_handle, "tuner create", args13, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_tuner_create(cli_handle, "tuner create", args14, 1); CU_ASSERT(cmdstat == VQEC_CLI_OK); /* tuner bind and unbind for TR-135 */ cmdstat = vqec_cmd_tuner_bind(cli_handle, "tuner bind", args24, 7); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cmd_tuner_unbind(cli_handle, "tuner unbind", args13, 1); CU_ASSERT(cmdstat == VQEC_CLI_OK); /* tuner destroy */ cmdstat = vqec_cmd_tuner_destroy(cli_handle, "tuner destroy", args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_tuner_destroy(cli_handle, "tuner destroy", args11, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_tuner_destroy(cli_handle, "tuner destroy", args12, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_tuner_destroy(cli_handle, "tuner destroy", args14, 1); CU_ASSERT(cmdstat == VQEC_CLI_OK); /* channel tr-135 */ cmdstat = vqec_cmd_tuner_bind(cli_handle, "tuner bind", args24, 7); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cmd_channel_tr135(cli_handle, "channel tr-135", args31, 5); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cmd_channel_tr135(cli_handle, "channel tr-135", args32, 5); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_tuner_unbind(cli_handle, "tuner unbind", args13, 1); CU_ASSERT(cmdstat == VQEC_CLI_OK); /* * channel update (w/err & rcc) * * Test steps: * 1. bind a tuner to a unicast channel using chan params. * 2. verify some invalid source changes are rejected * 3. verify for a valid source change that the active channel's * config reflects the new source information */ CU_ASSERT(get_ip_address_by_if((char *)vqec_syscfg_get_ptr()->input_ifname, primary_dest_addr, INET_ADDRSTRLEN)); printf("Starting channel update tests with primary stream dest %s\n", primary_dest_addr); cmdstat = vqec_cmd_tuner_bind(cli_handle, "tuner bind", args_bind, sizeof(args_bind)/sizeof(char *)); CU_ASSERT(cmdstat == VQEC_CLI_OK); /* supply invalid channel args */ cmdstat = vqec_cmd_channel_update(cli_handle, "channel update", args_update1, sizeof(args_update1)/sizeof(char *)); CU_ASSERT(cmdstat != VQEC_CLI_OK); /* supply invalid channel args */ cmdstat = vqec_cmd_channel_update(cli_handle, "channel update", args_update2, sizeof(args_update2)/sizeof(char *)); CU_ASSERT(cmdstat != VQEC_CLI_OK); /* supply valid channel args */ cmdstat = vqec_cmd_channel_update(cli_handle, "channel update", args_update3, sizeof(args_update3)/sizeof(char *)); CU_ASSERT(cmdstat == VQEC_CLI_OK); /* verify the active channel's config has changed */ CU_ASSERT(inet_pton(AF_INET, primary_dest_addr, &dst_ip) > 0); dst_port = htons(60000); chan = vqec_chan_find(dst_ip, dst_port); CU_ASSERT(chan != NULL); if (chan) { /* primary stream */ CU_ASSERT(inet_pton(AF_INET, "127.0.0.2", &src_ip)); src_port = htons(32994); CU_ASSERT(chan->cfg.primary_source_addr.s_addr == src_ip); CU_ASSERT(chan->cfg.primary_source_port == src_port); /* repair stream */ CU_ASSERT(inet_pton(AF_INET, "127.0.0.3", &src_ip)); src_port = htons(56004); CU_ASSERT(chan->cfg.rtx_source_addr.s_addr == src_ip); CU_ASSERT(chan->cfg.rtx_source_port == src_port); } cmdstat = vqec_cmd_tuner_unbind(cli_handle, "tuner unbind", args13, 1); CU_ASSERT(cmdstat == VQEC_CLI_OK); /* * channel update (w/o er & rcc) */ cmdstat = vqec_cmd_tuner_bind(cli_handle, "tuner bind", args_bind2, sizeof(args_bind2)/sizeof(char *)); CU_ASSERT(cmdstat == VQEC_CLI_OK); /* supply valid channel args */ cmdstat = vqec_cmd_channel_update(cli_handle, "channel update", args_update4, sizeof(args_update4)/sizeof(char *)); CU_ASSERT(cmdstat == VQEC_CLI_OK); /* verify the active channel's config has changed back */ CU_ASSERT(inet_pton(AF_INET, primary_dest_addr, &dst_ip) > 0); dst_port = htons(60000); chan = vqec_chan_find(dst_ip, dst_port); CU_ASSERT(chan != NULL); if (chan) { /* primary stream */ CU_ASSERT(inet_pton(AF_INET, "127.0.0.1", &src_ip)); src_port = htons(32993); CU_ASSERT(chan->cfg.primary_source_addr.s_addr == src_ip); CU_ASSERT(chan->cfg.primary_source_port == src_port); } cmdstat = vqec_cmd_tuner_unbind(cli_handle, "tuner unbind", args13, 1); CU_ASSERT(cmdstat == VQEC_CLI_OK); /* update [file <filename> type {network|channel|override-tags}] */ cmdstat = vqec_cmd_update(cli_handle, "update", args_update_config1, 3); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_update(cli_handle, "update", args_update_config1, 4); CU_ASSERT(cmdstat == VQEC_CLI_OK); } static void test_vqec_cli_clear_cmds (void) { int cmdstat = 0; char *args0[] = { }; char *args11[] = { "?" }; char *args12[] = { "deftu?" }; char *args13[] = { "invalidtuner" }; char *args14[] = { "deftuner" }; /* clear counters */ cmdstat = vqec_cmd_clear_counters(cli_handle, "clear counters", args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cmd_clear_counters(cli_handle, "clear counters", args11, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_clear_counters(cli_handle, "clear counters", args12, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_clear_counters(cli_handle, "clear counters", args13, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_clear_counters(cli_handle, "clear counters", args14, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); } static void test_vqec_cli_debug_cmds (void) { int cmdstat = 0; char command[100]; char *args0[] = { }; char *args11[] = { "?" }; char *args12[] = { "rc?" }; char *args13[] = { "rcc" }; memset(command, 0, sizeof(command)); /* invalid command/args */ strncpy(command, "debug <type>", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); strncpy(command, "debug ?", 50); cmdstat = vqec_debug_func(cli_handle, command, args11, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); strncpy(command, "debug rcc enable", 50); cmdstat = vqec_debug_func(cli_handle, command, args12, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); strncpy(command, "debug rcc enable", 50); cmdstat = vqec_debug_func(cli_handle, command, args13, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); /* channel */ printf("trying debug channel enable...\n"); strncpy(command, "debug channel enable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_CHANNEL)); strncpy(command, "debug channel disable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_CHANNEL)); /* pcm */ strncpy(command, "debug pcm enable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_PCM)); strncpy(command, "debug pcm disable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_PCM)); /* input */ strncpy(command, "debug input enable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_INPUT)); strncpy(command, "debug input disable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_INPUT)); /* output */ strncpy(command, "debug output enable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_OUTPUT)); strncpy(command, "debug output disable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_OUTPUT)); /* event */ strncpy(command, "debug event enable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_EVENT)); strncpy(command, "debug event disable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_EVENT)); /* igmp */ strncpy(command, "debug igmp enable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_IGMP)); strncpy(command, "debug igmp disable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_IGMP)); /* tuner */ strncpy(command, "debug tuner enable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_TUNER)); strncpy(command, "debug tuner disable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_TUNER)); /* recv-socket */ strncpy(command, "debug recv-socket enable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_RECV_SOCKET)); strncpy(command, "debug recv-socket disable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_RECV_SOCKET)); /* timer */ strncpy(command, "debug timer enable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_TIMER)); strncpy(command, "debug timer disable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_TIMER)); /* rtcp */ strncpy(command, "debug rtcp enable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_RTCP)); strncpy(command, "debug rtcp disable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_RTCP)); /* error-repair */ strncpy(command, "debug error-repair enable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_ERROR_REPAIR)); strncpy(command, "debug error-repair disable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_ERROR_REPAIR)); /* rcc */ strncpy(command, "debug rcc enable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_RCC)); strncpy(command, "debug rcc disable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_RCC)); /* nat */ strncpy(command, "debug nat enable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_NAT)); strncpy(command, "debug nat disable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_NAT)); /* chan_cfg */ strncpy(command, "debug chan_cfg enable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_CHAN_CFG)); strncpy(command, "debug chan_cfg disable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_CHAN_CFG)); /* updater */ strncpy(command, "debug updater enable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_UPDATER)); strncpy(command, "debug updater disable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_UPDATER)); /* all */ strncpy(command, "debug all enable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_CHANNEL)); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_PCM)); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_INPUT)); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_OUTPUT)); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_EVENT)); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_IGMP)); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_TUNER)); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_RECV_SOCKET)); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_TIMER)); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_RTCP)); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_ERROR_REPAIR)); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_RCC)); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_NAT)); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_CHAN_CFG)); CU_ASSERT(VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_UPDATER)); strncpy(command, "debug all disable", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_CHANNEL)); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_PCM)); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_INPUT)); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_OUTPUT)); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_EVENT)); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_IGMP)); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_TUNER)); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_RECV_SOCKET)); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_TIMER)); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_RTCP)); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_ERROR_REPAIR)); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_RCC)); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_NAT)); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_CHAN_CFG)); CU_ASSERT(!VQEC_GET_DEBUG_FLAG(VQEC_DEBUG_UPDATER)); /* ? */ strncpy(command, "debug ?", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); strncpy(command, "debug rcc ?", 50); cmdstat = vqec_debug_func(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); } static void test_vqec_cli_hag_cmds (void) { int cmdstat = 0; char *args0[] = { }; char *args11[] = { "?" }; char *args12[] = { "deftu?" }; char *args21[] = { "deftuner", "eth0" }; char *args31[] = { "deftuner", "eth0", "192.168.1.128" }; char *args32[] = { "deftuner", "eth0", "udp://192.168.1.128:50000" }; char *args33[] = { "deftuner", "eth0", "udp://192.368.1.128:50000" }; char *args41[] = { "deftuner", "eth0", "192.168.1.128", "0.0.240.0" }; #ifdef HAVE_HAG_MODE char *args42[] = { "deftuner", "eth0", "192.168.1.256", "0.0.240.0" }; char *args43[] = { "deftuner", "eth0", "192.168.1.128", "0.0.288.0" }; char *args44[] = { "deftuner", "eth0", "192.168.1.128", "0.4.240.0" }; char *args51[] = { "deftuner", "eth0", "192.168.1.128", "0.0.240.0", "extraarg"}; #endif /* HAVE_HAG_MODE */ #ifdef HAVE_HAG_MODE /* proxy-igmp-join */ cmdstat = vqec_cmd_proxy_igmp_join(cli_handle, "proxy-igmp-join", args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_proxy_igmp_join(cli_handle, "proxy-igmp-join", args11, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_proxy_igmp_join(cli_handle, "proxy-igmp-join", args12, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); /* Need to run this in root mode, so failed in socket create */ cmdstat = vqec_cmd_proxy_igmp_join(cli_handle, "proxy-igmp-join", args31, 3); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_proxy_igmp_join(cli_handle, "proxy-igmp-join", args41, 4); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_proxy_igmp_join(cli_handle, "proxy-igmp-join", args42, 4); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_proxy_igmp_join(cli_handle, "proxy-igmp-join", args43, 4); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_proxy_igmp_join(cli_handle, "proxy-igmp-join", args44, 4); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_proxy_igmp_join(cli_handle, "proxy-igmp-join", args51, 5); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); #endif /* HAVE_HAG_MODE */ /* stream-output */ cmdstat = vqec_cmd_stream_output(cli_handle, "stream-output", args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_stream_output(cli_handle, "stream-output", args11, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_stream_output(cli_handle, "stream-output", args12, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_stream_output(cli_handle, "stream-output", args21, 2); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_stream_output(cli_handle, "stream-output", args31, 3); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_stream_output(cli_handle, "stream-output", args32, 3); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cmd_stream_output(cli_handle, "stream-output", args33, 3); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_stream_output(cli_handle, "stream-output", args41, 4); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); } static void test_vqec_cli_monitor_cmds (void) { int cmdstat = 0; char command[100]; char *args0[] = { }; char *args11[] = { "?" }; char *args12[] = { "file?" }; char *args13[] = { "utest_elog_dump_file.tmp" }; memset(command, 0, sizeof(command)); /* invalid command/args */ strncpy(command, "monitor elog <3rdparam>", 50); cmdstat = vqec_cmd_monitor_elog(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); strncpy(command, "monitor elog dump", 50); cmdstat = vqec_cmd_monitor_elog(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); strncpy(command, "monitor elog on", 50); cmdstat = vqec_cmd_monitor_elog(cli_handle, command, args11, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); /* monitor elog on */ strncpy(command, "monitor elog on", 50); cmdstat = vqec_cmd_monitor_elog(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); /* monitor elog off */ strncpy(command, "monitor elog off", 50); cmdstat = vqec_cmd_monitor_elog(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); /* monitor elog reset */ strncpy(command, "monitor elog reset", 50); cmdstat = vqec_cmd_monitor_elog(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); /* monitor elog dump */ strncpy(command, "monitor elog dump", 50); cmdstat = vqec_cmd_monitor_elog(cli_handle, command, args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); strncpy(command, "monitor elog dump", 50); cmdstat = vqec_cmd_monitor_elog(cli_handle, command, args11, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); strncpy(command, "monitor elog dump", 50); cmdstat = vqec_cmd_monitor_elog(cli_handle, command, args12, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); strncpy(command, "monitor elog dump", 50); cmdstat = vqec_cmd_monitor_elog(cli_handle, command, args13, 1); CU_ASSERT(cmdstat == VQEC_CLI_OK); /* print elog status report */ status_report(); /* Output Scheduling commands */ cmdstat = vqec_cmd_stream_output(cli_handle, "monitor output-sched", args11, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cmd_monitor_outputsched_on(cli_handle, "monitor output-sched on", args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cmd_monitor_outputsched_off(cli_handle, "monitor output-sched off", args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cmd_monitor_outputsched_reset(cli_handle, "monitor output-sched reset", args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cmd_monitor_outputsched_show(cli_handle, "monitor output-sched show", args0, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); } /* Test exit, quit, disable, ?, special commands */ static void test_vqec_cli_special_cmds (void) { int cmdstat = 0; char *args1[] = { "?" }; char *args2[] = { "enable" }; char *args3[] = { "disable" }; char *args4[] = { "logout" }; char *args5[] = { "exit" }; char *args6[] = { "quit" }; char *args7[] = { "history" }; cmdstat = vqec_cli_help_func(cli_handle, "?", args1, 1); CU_ASSERT(cmdstat == VQEC_CLI_OK); /* Enter the privileged mode */ cmdstat = vqec_cli_help_func(cli_handle, "enable", args2, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cli_help_func(cli_handle, "disable", args3, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cli_help_func(cli_handle, "logout", args4, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cli_help_func(cli_handle, "exit", args5, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cli_help_func(cli_handle, "quit", args6, 1); CU_ASSERT(cmdstat == VQEC_CLI_ERROR); cmdstat = vqec_cli_help_func(cli_handle, "?", args1, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); /* Enter the privileged mode */ cmdstat = vqec_cli_help_func(cli_handle, "enable", args2, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cli_help_func(cli_handle, "disable", args3, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cli_help_func(cli_handle, "logout", args4, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cli_help_func(cli_handle, "exit", args5, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cli_help_func(cli_handle, "quit", args6, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); cmdstat = vqec_cli_help_func(cli_handle, "history", args7, 0); CU_ASSERT(cmdstat == VQEC_CLI_OK); } void fixerrs(void){ test_vqec_cli_monitor_cmds(); } CU_TestInfo test_array_cli[] = { {"test vqec_cli_helper_funcs",test_vqec_cli_helper_funcs}, {"test vqec_cli_show_cmds",test_vqec_cli_show_cmds}, {"test vqec_cli_global_cmds",test_vqec_cli_global_cmds}, {"test vqec_cli_test_cmds",test_vqec_cli_test_cmds}, {"test vqec_cli_clear_cmds",test_vqec_cli_clear_cmds}, {"test vqec_cli_debug_cmds",test_vqec_cli_debug_cmds}, {"test vqec_cli_hag_cmds",test_vqec_cli_hag_cmds}, {"test vqec_cli_monitor_cmds",test_vqec_cli_monitor_cmds}, {"test vqec_cli_special_cmds",test_vqec_cli_special_cmds}, CU_TEST_INFO_NULL, };
c
src/morus.c
ildyria/MiniMorus
0
6456275
#include "morus.h" void print_state(state state) { printf("--------------------------------------------\n"); printf(" S0 | S1 | S3 | S3 | S4 \n"); printf("%08x %08x %08x %08x %08x\n", state[0][3], state[1][3], state[2][3], state[3][3], state[4][3]); printf("%08x %08x %08x %08x %08x\n", state[0][2], state[1][2], state[2][2], state[3][2], state[4][2]); printf("%08x %08x %08x %08x %08x\n", state[0][1], state[1][1], state[2][1], state[3][1], state[4][1]); printf("%08x %08x %08x %08x %08x\n", state[0][0], state[1][0], state[2][0], state[3][0], state[4][0]); } void print_word(state_words word) { printf("%08x %08x %08x %08x\n", word[0], word[1], word[2], word[3]); } void print(state* saved_state, state_words* saved_cipher) { int i; printf("-------------------------------------------- Ciphers\n"); for ( i = 0; i < 5; i++) { print_word(saved_cipher[i]); } printf("-------------------------------------------- States\n"); for ( i = 0; i < 6; i++) { print_state(saved_state[i]); } } uint32_t rotate_left(uint32_t x, int bits) { if (bits == 0) return x; return (x << bits) | (x >> (32 - bits)); } void copy_state_words(state_words out, const state_words word) { out[0] = word[0]; out[1] = word[1]; out[2] = word[2]; out[3] = word[3]; } void rotate_left_word(state_words word, int bits) { word[0] = rotate_left(word[0], bits); word[1] = rotate_left(word[1], bits); word[2] = rotate_left(word[2], bits); word[3] = rotate_left(word[3], bits); } void and_xor_to_word(state_words o, const state_words s1 , const state_words s2) { o[0] ^= s1[0] & s2[0]; o[1] ^= s1[1] & s2[1]; o[2] ^= s1[2] & s2[2]; o[3] ^= s1[3] & s2[3]; } void xor_to_word(state_words o, const state_words s) { o[0] ^= s[0]; o[1] ^= s[1]; o[2] ^= s[2]; o[3] ^= s[3]; } void permute_words(state_words s, int bits) { // return; uint32_t t; if (bits == 96) { t = s[0]; s[0] = s[1]; s[1] = s[2]; s[2] = s[3]; s[3] = t; } if (bits == 64) { t = s[0];s[0] = s[2];s[2] = t; t = s[1];s[1] = s[3];s[3] = t; } if (bits == 32) { t = s[3]; s[3] = s[2]; s[2] = s[1]; s[1] = s[0]; s[0] = t; } } void null_word(state_words* w){ (*w)[0] = 0; (*w)[1] = 0; (*w)[2] = 0; (*w)[3] = 0; } void rand_init(state st, struct RNG_state* seed){ st[0][0] = aesrand_int32_r(seed); st[1][0] = aesrand_int32_r(seed); st[2][0] = aesrand_int32_r(seed); st[3][0] = aesrand_int32_r(seed); st[4][0] = aesrand_int32_r(seed); st[0][1] = aesrand_int32_r(seed); st[1][1] = aesrand_int32_r(seed); st[2][1] = aesrand_int32_r(seed); st[3][1] = aesrand_int32_r(seed); st[4][1] = aesrand_int32_r(seed); st[0][2] = aesrand_int32_r(seed); st[1][2] = aesrand_int32_r(seed); st[2][2] = aesrand_int32_r(seed); st[3][2] = aesrand_int32_r(seed); st[4][2] = aesrand_int32_r(seed); st[0][3] = aesrand_int32_r(seed); st[1][3] = aesrand_int32_r(seed); st[2][3] = aesrand_int32_r(seed); st[3][3] = aesrand_int32_r(seed); st[4][3] = aesrand_int32_r(seed); } void iterate(state st, state_words message) { // print_state(st); xor_to_word(st[0],st[3]); and_xor_to_word(st[0], st[1], st[2]); rotate_left_word(st[0],5); permute_words(st[3],32); xor_to_word(st[1], message); xor_to_word(st[1],st[4]); and_xor_to_word(st[1], st[2], st[3]); rotate_left_word(st[1],31); permute_words(st[4],64); xor_to_word(st[2], message); xor_to_word(st[2],st[0]); and_xor_to_word(st[2], st[3], st[4]); rotate_left_word(st[2],7); permute_words(st[0],96); xor_to_word(st[3], message); xor_to_word(st[3],st[1]); and_xor_to_word(st[3], st[4], st[0]); rotate_left_word(st[3],22); permute_words(st[1],64); xor_to_word(st[4], message); xor_to_word(st[4],st[2]); and_xor_to_word(st[4], st[0], st[1]); rotate_left_word(st[4],13); permute_words(st[2],32); // print_state(st); } void encrypt(state_words* out, state_words message, state st) { state_words mem, st1; // printf("-------------------------------------------- Message\n"); // print_word(message); copy_state_words(mem,message); copy_state_words(st1,st[1]); permute_words(st1,96); xor_to_word(st1,message); xor_to_word(st1,st[0]); and_xor_to_word(st1,st[2],st[3]); iterate(st, mem); copy_state_words(*out,st1); // (*out)[0] = st1[0]; // (*out)[1] = st1[1]; // (*out)[2] = st1[2]; // (*out)[3] = st1[3]; // printf("-------------------------------------------- CipherText\n"); // print_word(st1); // print_word(*out); } uint32_t gen_mask(uint32_t* mask, unsigned int i) { *mask |= (1 << i); return 0; } // Compute the Hamming Weight uint32_t HW(uint32_t x) { x = x - ((x >> 1) & 0x55555555); x = (x & 0x33333333) + ((x >> 2) & 0x33333333); x = (x + (x >> 4)) & 0x0F0F0F0F; x = x + (x >> 8); x = x + (x >> 16); return x & 0x0000003F; } // return xor([mask(S[1][0], [0]), // mask(S[1][4], [0]), // mask(C[1], [0,8,26]), // mask(C[2], [13,31]), // # 2^-3 version // mask(S[2][4], [13]), // mask(S[3][1], [12]), // # 2^-4 version // #mask(S[2][1], [13]), // ]) # 2^-3 int linear(state* saved_state, state_words* saved_cipher) { uint32_t mask = 0; uint32_t res = 0; #if 0 // print(saved_state,saved_cipher); mask = 0; gen_mask(&mask,0); res ^= saved_state[1][0][0] & mask; // res ^= saved_state[1][0][1] & mask; // res ^= saved_state[1][0][2] & mask; // res ^= saved_state[1][0][3] & mask; res ^= saved_state[1][4][0] & mask; // res ^= saved_state[1][4][1] & mask; // res ^= saved_state[1][4][2] & mask; // res ^= saved_state[1][4][3] & mask; mask = 0; gen_mask(&mask,0); gen_mask(&mask,8); gen_mask(&mask,26); res ^= saved_cipher[1][0] & mask; // res ^= saved_cipher[1][1] & mask; // res ^= saved_cipher[1][2] & mask; // res ^= saved_cipher[1][3] & mask; mask = 0; gen_mask(&mask,13); gen_mask(&mask,31); res ^= saved_cipher[1][0] & mask; // res ^= saved_cipher[1][1] & mask; // res ^= saved_cipher[1][2] & mask; // res ^= saved_cipher[1][3] & mask; mask = 0; gen_mask(&mask,13); res ^= saved_state[2][4][0] & mask; // res ^= saved_state[2][4][1] & mask; // res ^= saved_state[2][4][2] & mask; // res ^= saved_state[2][4][3] & mask; mask = 0; gen_mask(&mask,13); res ^= saved_state[2][1][0] & mask; // res ^= saved_state[2][1][1] & mask; // res ^= saved_state[2][1][2] & mask; // res ^= saved_state[2][1][3] & mask; mask = 0; gen_mask(&mask,12); res ^= saved_state[3][1][0] & mask; // res ^= saved_state[3][1][1] & mask; // res ^= saved_state[3][1][2] & mask; // res ^= saved_state[3][1][3] & mask; #else /* res ^= saved_state[0][1][0] & (1<<0); */ /* res ^= saved_state[0][1][1] & (1<<0); */ /* res ^= saved_state[1][0][3] & (1<<5); */ /* res ^= saved_cipher[0][0] & (1<<0); */ /* res ^= saved_state[0][1][1] & (1<<0); */ /* res ^= saved_state[0][0][0] & (1<<0); */ /* res ^= saved_cipher[0][0] & (1<<0); */ /* res ^= saved_state[0][1][0] & (1<<0); */ /* res ^= saved_state[1][0][3] & (1<<5); */ /* res ^= saved_state[0][0][0] & (1<<0); */ /* res ^= saved_state[0][3][0] & (1<<0); */ /* res ^= saved_state[1][1][0] & (1<<5); */ /* res ^= saved_state[1][0][3] & (1<<5); */ /* res ^= saved_cipher[1][3] & (1<<5); */ /* res ^= saved_state[0][1][0] & (1<<0); */ /* res ^= saved_state[0][1][1] & (1<<0); */ /* res ^= saved_state[1][1][0] & (1<<5); */ /* res ^= saved_cipher[0][0] & (1<<0); */ /* res ^= saved_cipher[1][3] & (1<<5); */ /* res ^= saved_state[0][1][1] & (1<<0); */ /* res ^= saved_state[0][1][2] & (1<<0); */ /* res ^= saved_state[1][1][1] & (1<<5); */ /* res ^= saved_cipher[0][1] & (1<<0); */ /* res ^= saved_cipher[1][0] & (1<<5); */ /* res ^= saved_state[1][1][0] & (1<<5); */ /* res ^= saved_state[1][1][1] & (1<<5); */ /* res ^= saved_state[2][1][0] & (1<<10); */ /* res ^= saved_cipher[1][0] & (1<<5); */ /* res ^= saved_cipher[2][3] & (1<<10); */ res ^= saved_cipher[0][0] & (1<<27); res ^= saved_cipher[0][1] & (1<<27); res ^= saved_cipher[0][2] & (1<<27); res ^= saved_cipher[0][3] & (1<<27); /* res ^= saved_state[1][0][0] & (1<<0); */ /* res ^= saved_state[1][0][1] & (1<<0); */ /* res ^= saved_state[1][0][2] & (1<<0); */ /* res ^= saved_state[1][0][3] & (1<<0); */ res ^= saved_cipher[1][0] & (1<<0); res ^= saved_cipher[1][1] & (1<<0); res ^= saved_cipher[1][2] & (1<<0); res ^= saved_cipher[1][3] & (1<<0); /* res ^= saved_state[2][0][0] & (1<<5); */ /* res ^= saved_state[2][0][1] & (1<<5); */ /* res ^= saved_state[2][0][2] & (1<<5); */ /* res ^= saved_state[2][0][3] & (1<<5); */ res ^= saved_state[1][3][0] & (1<<0); res ^= saved_state[1][3][1] & (1<<0); res ^= saved_state[1][3][2] & (1<<0); res ^= saved_state[1][3][3] & (1<<0); /* res ^= saved_state[1][0][0] & (1<<0); */ /* res ^= saved_state[1][0][1] & (1<<0); */ /* res ^= saved_state[1][0][2] & (1<<0); */ /* res ^= saved_state[1][0][3] & (1<<0); */ /* res ^= saved_state[2][0][0] & (1<<5); */ /* res ^= saved_state[2][0][1] & (1<<5); */ /* res ^= saved_state[2][0][2] & (1<<5); */ /* res ^= saved_state[2][0][3] & (1<<5); */ res ^= saved_state[1][1][0] & (1<<0); res ^= saved_state[1][1][1] & (1<<0); res ^= saved_state[1][1][2] & (1<<0); res ^= saved_state[1][1][3] & (1<<0); #endif return 1 & HW(res); }
c
80186PC/include/ATA/ATADevice.h
moon-touched/80186PC
0
4480063
#ifndef ATA_ATA_DEVICE_H #define ATA_ATA_DEVICE_H #include <thread> #include <mutex> #include <atomic> #include <array> #include <ATA/IATADevice.h> class ATADevice : public IATADevice { protected: ATADevice(); ~ATADevice(); public: void write(CS cs, uint8_t address, uint16_t value) override; uint16_t read(CS cs, uint8_t address) override; void attachToHost(IATADeviceHost* host) override; bool isInterruptRequested() const override; protected: struct ATACommand { uint8_t feature; uint8_t sectorCount; uint8_t sectorNumber; uint8_t cylinderLow; uint8_t cylinderHigh; uint8_t driveHead; uint8_t command; }; struct ATACommandResult { uint8_t status; uint8_t error; }; virtual void resetDevice() = 0; virtual void executeCommand(const ATACommand& command, ATACommandResult& result) = 0; virtual void pioWriteFinished() = 0; void stopDriveThread(); void pioRead(size_t size); void pioWrite(size_t size); inline uint8_t* transferBuffer() { return m_transferBuffer.data(); } inline void set8BitPIO() { m_eightBitPIO = true; } inline void clear8BitPIO() { m_eightBitPIO = false; } private: enum class TransferState { Idle, PIORead, PIOWrite }; void driveThread(); void postReset(); void postResetLocked(); void postCommand(); void postCommandLocked(); void setInterruptLocked(); void clearInterruptLocked(); bool isInterruptRequestedLocked() const; void updateDRQLocked(TransferState state, bool first); mutable std::mutex m_driveThreadMutex; std::condition_variable m_driveThreadCondvar; bool m_stopDriveThread; bool m_resetRequest; bool m_commandRequest; bool m_interruptPending; bool m_interruptEnabled; bool m_resetAsserted; bool m_eightBitPIO; uint8_t m_status; uint8_t m_feature; uint8_t m_error; uint8_t m_sectorCount; uint8_t m_sectorNumber; uint8_t m_cylinderLow; uint8_t m_cylinderHigh; uint8_t m_driveHead; uint8_t m_command; IATADeviceHost* m_host; std::array<uint8_t, 131072> m_transferBuffer; TransferState m_transferState; size_t m_transferPosition; size_t m_transferSize; std::thread m_driveThread; }; #endif
c
test/aarch32/traces/assembler-cond-rd-rn-rm-uadd8-a32.h
capablevms/VIXL
573
8050247
// Copyright 2015, VIXL authors // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // * Neither the name of ARM Limited nor the names of its contributors may be // used to endorse or promote products derived from this software without // specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // --------------------------------------------------------------------- // This file is auto generated using tools/generate_simulator_traces.py. // // PLEASE DO NOT EDIT. // --------------------------------------------------------------------- #ifndef VIXL_ASSEMBLER_COND_RD_RN_RM_UADD8_A32_H_ #define VIXL_ASSEMBLER_COND_RD_RN_RM_UADD8_A32_H_ const byte kInstruction_uadd8_hi_r1_r9_r5[] = { 0x95, 0x1f, 0x59, 0x86 // uadd8 hi r1 r9 r5 }; const byte kInstruction_uadd8_pl_r8_r6_r2[] = { 0x92, 0x8f, 0x56, 0x56 // uadd8 pl r8 r6 r2 }; const byte kInstruction_uadd8_hi_r5_r8_r2[] = { 0x92, 0x5f, 0x58, 0x86 // uadd8 hi r5 r8 r2 }; const byte kInstruction_uadd8_vc_r9_r2_r7[] = { 0x97, 0x9f, 0x52, 0x76 // uadd8 vc r9 r2 r7 }; const byte kInstruction_uadd8_lt_r4_r6_r3[] = { 0x93, 0x4f, 0x56, 0xb6 // uadd8 lt r4 r6 r3 }; const byte kInstruction_uadd8_le_r11_r6_r2[] = { 0x92, 0xbf, 0x56, 0xd6 // uadd8 le r11 r6 r2 }; const byte kInstruction_uadd8_cc_r8_r14_r4[] = { 0x94, 0x8f, 0x5e, 0x36 // uadd8 cc r8 r14 r4 }; const byte kInstruction_uadd8_le_r5_r14_r6[] = { 0x96, 0x5f, 0x5e, 0xd6 // uadd8 le r5 r14 r6 }; const byte kInstruction_uadd8_lt_r6_r1_r0[] = { 0x90, 0x6f, 0x51, 0xb6 // uadd8 lt r6 r1 r0 }; const byte kInstruction_uadd8_lt_r5_r0_r9[] = { 0x99, 0x5f, 0x50, 0xb6 // uadd8 lt r5 r0 r9 }; const byte kInstruction_uadd8_le_r8_r12_r7[] = { 0x97, 0x8f, 0x5c, 0xd6 // uadd8 le r8 r12 r7 }; const byte kInstruction_uadd8_eq_r7_r14_r6[] = { 0x96, 0x7f, 0x5e, 0x06 // uadd8 eq r7 r14 r6 }; const byte kInstruction_uadd8_cs_r7_r4_r6[] = { 0x96, 0x7f, 0x54, 0x26 // uadd8 cs r7 r4 r6 }; const byte kInstruction_uadd8_gt_r9_r6_r9[] = { 0x99, 0x9f, 0x56, 0xc6 // uadd8 gt r9 r6 r9 }; const byte kInstruction_uadd8_ne_r13_r9_r1[] = { 0x91, 0xdf, 0x59, 0x16 // uadd8 ne r13 r9 r1 }; const byte kInstruction_uadd8_ge_r13_r1_r13[] = { 0x9d, 0xdf, 0x51, 0xa6 // uadd8 ge r13 r1 r13 }; const byte kInstruction_uadd8_ls_r8_r10_r2[] = { 0x92, 0x8f, 0x5a, 0x96 // uadd8 ls r8 r10 r2 }; const byte kInstruction_uadd8_hi_r0_r13_r5[] = { 0x95, 0x0f, 0x5d, 0x86 // uadd8 hi r0 r13 r5 }; const byte kInstruction_uadd8_pl_r13_r7_r8[] = { 0x98, 0xdf, 0x57, 0x56 // uadd8 pl r13 r7 r8 }; const byte kInstruction_uadd8_ge_r4_r13_r11[] = { 0x9b, 0x4f, 0x5d, 0xa6 // uadd8 ge r4 r13 r11 }; const byte kInstruction_uadd8_cs_r5_r10_r5[] = { 0x95, 0x5f, 0x5a, 0x26 // uadd8 cs r5 r10 r5 }; const byte kInstruction_uadd8_cs_r5_r4_r3[] = { 0x93, 0x5f, 0x54, 0x26 // uadd8 cs r5 r4 r3 }; const byte kInstruction_uadd8_ls_r6_r14_r8[] = { 0x98, 0x6f, 0x5e, 0x96 // uadd8 ls r6 r14 r8 }; const byte kInstruction_uadd8_vs_r3_r8_r6[] = { 0x96, 0x3f, 0x58, 0x66 // uadd8 vs r3 r8 r6 }; const byte kInstruction_uadd8_vc_r7_r12_r3[] = { 0x93, 0x7f, 0x5c, 0x76 // uadd8 vc r7 r12 r3 }; const byte kInstruction_uadd8_ge_r1_r4_r1[] = { 0x91, 0x1f, 0x54, 0xa6 // uadd8 ge r1 r4 r1 }; const byte kInstruction_uadd8_cc_r4_r7_r10[] = { 0x9a, 0x4f, 0x57, 0x36 // uadd8 cc r4 r7 r10 }; const byte kInstruction_uadd8_cc_r2_r0_r13[] = { 0x9d, 0x2f, 0x50, 0x36 // uadd8 cc r2 r0 r13 }; const byte kInstruction_uadd8_vs_r9_r6_r8[] = { 0x98, 0x9f, 0x56, 0x66 // uadd8 vs r9 r6 r8 }; const byte kInstruction_uadd8_cs_r14_r11_r13[] = { 0x9d, 0xef, 0x5b, 0x26 // uadd8 cs r14 r11 r13 }; const byte kInstruction_uadd8_pl_r5_r8_r4[] = { 0x94, 0x5f, 0x58, 0x56 // uadd8 pl r5 r8 r4 }; const byte kInstruction_uadd8_pl_r2_r3_r7[] = { 0x97, 0x2f, 0x53, 0x56 // uadd8 pl r2 r3 r7 }; const byte kInstruction_uadd8_cs_r7_r12_r14[] = { 0x9e, 0x7f, 0x5c, 0x26 // uadd8 cs r7 r12 r14 }; const byte kInstruction_uadd8_hi_r6_r6_r1[] = { 0x91, 0x6f, 0x56, 0x86 // uadd8 hi r6 r6 r1 }; const byte kInstruction_uadd8_cc_r6_r9_r6[] = { 0x96, 0x6f, 0x59, 0x36 // uadd8 cc r6 r9 r6 }; const byte kInstruction_uadd8_ne_r12_r12_r0[] = { 0x90, 0xcf, 0x5c, 0x16 // uadd8 ne r12 r12 r0 }; const byte kInstruction_uadd8_cc_r9_r3_r8[] = { 0x98, 0x9f, 0x53, 0x36 // uadd8 cc r9 r3 r8 }; const byte kInstruction_uadd8_mi_r13_r6_r1[] = { 0x91, 0xdf, 0x56, 0x46 // uadd8 mi r13 r6 r1 }; const byte kInstruction_uadd8_lt_r4_r8_r6[] = { 0x96, 0x4f, 0x58, 0xb6 // uadd8 lt r4 r8 r6 }; const byte kInstruction_uadd8_hi_r11_r5_r9[] = { 0x99, 0xbf, 0x55, 0x86 // uadd8 hi r11 r5 r9 }; const byte kInstruction_uadd8_cc_r6_r10_r6[] = { 0x96, 0x6f, 0x5a, 0x36 // uadd8 cc r6 r10 r6 }; const byte kInstruction_uadd8_eq_r10_r10_r5[] = { 0x95, 0xaf, 0x5a, 0x06 // uadd8 eq r10 r10 r5 }; const byte kInstruction_uadd8_al_r5_r4_r11[] = { 0x9b, 0x5f, 0x54, 0xe6 // uadd8 al r5 r4 r11 }; const byte kInstruction_uadd8_pl_r11_r11_r2[] = { 0x92, 0xbf, 0x5b, 0x56 // uadd8 pl r11 r11 r2 }; const byte kInstruction_uadd8_ls_r6_r14_r12[] = { 0x9c, 0x6f, 0x5e, 0x96 // uadd8 ls r6 r14 r12 }; const byte kInstruction_uadd8_vc_r7_r7_r2[] = { 0x92, 0x7f, 0x57, 0x76 // uadd8 vc r7 r7 r2 }; const byte kInstruction_uadd8_eq_r10_r8_r4[] = { 0x94, 0xaf, 0x58, 0x06 // uadd8 eq r10 r8 r4 }; const byte kInstruction_uadd8_al_r14_r7_r2[] = { 0x92, 0xef, 0x57, 0xe6 // uadd8 al r14 r7 r2 }; const byte kInstruction_uadd8_cs_r3_r11_r10[] = { 0x9a, 0x3f, 0x5b, 0x26 // uadd8 cs r3 r11 r10 }; const byte kInstruction_uadd8_ls_r11_r4_r0[] = { 0x90, 0xbf, 0x54, 0x96 // uadd8 ls r11 r4 r0 }; const byte kInstruction_uadd8_hi_r11_r8_r9[] = { 0x99, 0xbf, 0x58, 0x86 // uadd8 hi r11 r8 r9 }; const byte kInstruction_uadd8_vs_r2_r14_r13[] = { 0x9d, 0x2f, 0x5e, 0x66 // uadd8 vs r2 r14 r13 }; const byte kInstruction_uadd8_al_r1_r13_r9[] = { 0x99, 0x1f, 0x5d, 0xe6 // uadd8 al r1 r13 r9 }; const byte kInstruction_uadd8_eq_r3_r9_r13[] = { 0x9d, 0x3f, 0x59, 0x06 // uadd8 eq r3 r9 r13 }; const byte kInstruction_uadd8_ge_r10_r3_r13[] = { 0x9d, 0xaf, 0x53, 0xa6 // uadd8 ge r10 r3 r13 }; const byte kInstruction_uadd8_pl_r8_r5_r10[] = { 0x9a, 0x8f, 0x55, 0x56 // uadd8 pl r8 r5 r10 }; const byte kInstruction_uadd8_vc_r8_r11_r6[] = { 0x96, 0x8f, 0x5b, 0x76 // uadd8 vc r8 r11 r6 }; const byte kInstruction_uadd8_eq_r0_r0_r5[] = { 0x95, 0x0f, 0x50, 0x06 // uadd8 eq r0 r0 r5 }; const byte kInstruction_uadd8_ne_r6_r5_r8[] = { 0x98, 0x6f, 0x55, 0x16 // uadd8 ne r6 r5 r8 }; const byte kInstruction_uadd8_hi_r5_r13_r3[] = { 0x93, 0x5f, 0x5d, 0x86 // uadd8 hi r5 r13 r3 }; const byte kInstruction_uadd8_ne_r11_r14_r14[] = { 0x9e, 0xbf, 0x5e, 0x16 // uadd8 ne r11 r14 r14 }; const byte kInstruction_uadd8_mi_r1_r0_r6[] = { 0x96, 0x1f, 0x50, 0x46 // uadd8 mi r1 r0 r6 }; const byte kInstruction_uadd8_le_r14_r8_r2[] = { 0x92, 0xef, 0x58, 0xd6 // uadd8 le r14 r8 r2 }; const byte kInstruction_uadd8_eq_r9_r6_r5[] = { 0x95, 0x9f, 0x56, 0x06 // uadd8 eq r9 r6 r5 }; const byte kInstruction_uadd8_eq_r11_r0_r13[] = { 0x9d, 0xbf, 0x50, 0x06 // uadd8 eq r11 r0 r13 }; const byte kInstruction_uadd8_pl_r4_r5_r14[] = { 0x9e, 0x4f, 0x55, 0x56 // uadd8 pl r4 r5 r14 }; const byte kInstruction_uadd8_cs_r13_r5_r13[] = { 0x9d, 0xdf, 0x55, 0x26 // uadd8 cs r13 r5 r13 }; const byte kInstruction_uadd8_mi_r0_r13_r8[] = { 0x98, 0x0f, 0x5d, 0x46 // uadd8 mi r0 r13 r8 }; const byte kInstruction_uadd8_lt_r2_r13_r3[] = { 0x93, 0x2f, 0x5d, 0xb6 // uadd8 lt r2 r13 r3 }; const byte kInstruction_uadd8_ls_r8_r1_r11[] = { 0x9b, 0x8f, 0x51, 0x96 // uadd8 ls r8 r1 r11 }; const byte kInstruction_uadd8_vc_r14_r11_r8[] = { 0x98, 0xef, 0x5b, 0x76 // uadd8 vc r14 r11 r8 }; const byte kInstruction_uadd8_lt_r4_r13_r12[] = { 0x9c, 0x4f, 0x5d, 0xb6 // uadd8 lt r4 r13 r12 }; const byte kInstruction_uadd8_eq_r2_r1_r14[] = { 0x9e, 0x2f, 0x51, 0x06 // uadd8 eq r2 r1 r14 }; const byte kInstruction_uadd8_eq_r9_r4_r14[] = { 0x9e, 0x9f, 0x54, 0x06 // uadd8 eq r9 r4 r14 }; const byte kInstruction_uadd8_hi_r10_r6_r13[] = { 0x9d, 0xaf, 0x56, 0x86 // uadd8 hi r10 r6 r13 }; const byte kInstruction_uadd8_ge_r12_r9_r4[] = { 0x94, 0xcf, 0x59, 0xa6 // uadd8 ge r12 r9 r4 }; const byte kInstruction_uadd8_le_r9_r11_r14[] = { 0x9e, 0x9f, 0x5b, 0xd6 // uadd8 le r9 r11 r14 }; const byte kInstruction_uadd8_ls_r0_r9_r5[] = { 0x95, 0x0f, 0x59, 0x96 // uadd8 ls r0 r9 r5 }; const byte kInstruction_uadd8_mi_r2_r3_r8[] = { 0x98, 0x2f, 0x53, 0x46 // uadd8 mi r2 r3 r8 }; const byte kInstruction_uadd8_ne_r14_r10_r14[] = { 0x9e, 0xef, 0x5a, 0x16 // uadd8 ne r14 r10 r14 }; const byte kInstruction_uadd8_eq_r6_r2_r10[] = { 0x9a, 0x6f, 0x52, 0x06 // uadd8 eq r6 r2 r10 }; const byte kInstruction_uadd8_lt_r11_r0_r12[] = { 0x9c, 0xbf, 0x50, 0xb6 // uadd8 lt r11 r0 r12 }; const byte kInstruction_uadd8_ne_r1_r12_r10[] = { 0x9a, 0x1f, 0x5c, 0x16 // uadd8 ne r1 r12 r10 }; const byte kInstruction_uadd8_cc_r1_r0_r2[] = { 0x92, 0x1f, 0x50, 0x36 // uadd8 cc r1 r0 r2 }; const byte kInstruction_uadd8_al_r5_r5_r7[] = { 0x97, 0x5f, 0x55, 0xe6 // uadd8 al r5 r5 r7 }; const byte kInstruction_uadd8_hi_r7_r13_r1[] = { 0x91, 0x7f, 0x5d, 0x86 // uadd8 hi r7 r13 r1 }; const byte kInstruction_uadd8_cs_r4_r4_r9[] = { 0x99, 0x4f, 0x54, 0x26 // uadd8 cs r4 r4 r9 }; const byte kInstruction_uadd8_eq_r14_r4_r14[] = { 0x9e, 0xef, 0x54, 0x06 // uadd8 eq r14 r4 r14 }; const byte kInstruction_uadd8_vs_r10_r5_r14[] = { 0x9e, 0xaf, 0x55, 0x66 // uadd8 vs r10 r5 r14 }; const byte kInstruction_uadd8_gt_r4_r3_r11[] = { 0x9b, 0x4f, 0x53, 0xc6 // uadd8 gt r4 r3 r11 }; const byte kInstruction_uadd8_ne_r14_r10_r12[] = { 0x9c, 0xef, 0x5a, 0x16 // uadd8 ne r14 r10 r12 }; const byte kInstruction_uadd8_vs_r2_r11_r0[] = { 0x90, 0x2f, 0x5b, 0x66 // uadd8 vs r2 r11 r0 }; const byte kInstruction_uadd8_ge_r5_r12_r7[] = { 0x97, 0x5f, 0x5c, 0xa6 // uadd8 ge r5 r12 r7 }; const byte kInstruction_uadd8_mi_r7_r14_r6[] = { 0x96, 0x7f, 0x5e, 0x46 // uadd8 mi r7 r14 r6 }; const byte kInstruction_uadd8_gt_r8_r3_r8[] = { 0x98, 0x8f, 0x53, 0xc6 // uadd8 gt r8 r3 r8 }; const byte kInstruction_uadd8_hi_r9_r14_r3[] = { 0x93, 0x9f, 0x5e, 0x86 // uadd8 hi r9 r14 r3 }; const byte kInstruction_uadd8_vc_r2_r11_r2[] = { 0x92, 0x2f, 0x5b, 0x76 // uadd8 vc r2 r11 r2 }; const byte kInstruction_uadd8_hi_r11_r7_r12[] = { 0x9c, 0xbf, 0x57, 0x86 // uadd8 hi r11 r7 r12 }; const byte kInstruction_uadd8_cs_r6_r4_r11[] = { 0x9b, 0x6f, 0x54, 0x26 // uadd8 cs r6 r4 r11 }; const byte kInstruction_uadd8_cs_r12_r5_r9[] = { 0x99, 0xcf, 0x55, 0x26 // uadd8 cs r12 r5 r9 }; const byte kInstruction_uadd8_ls_r5_r10_r5[] = { 0x95, 0x5f, 0x5a, 0x96 // uadd8 ls r5 r10 r5 }; const byte kInstruction_uadd8_ls_r0_r9_r13[] = { 0x9d, 0x0f, 0x59, 0x96 // uadd8 ls r0 r9 r13 }; const byte kInstruction_uadd8_lt_r3_r3_r5[] = { 0x95, 0x3f, 0x53, 0xb6 // uadd8 lt r3 r3 r5 }; const byte kInstruction_uadd8_mi_r0_r12_r8[] = { 0x98, 0x0f, 0x5c, 0x46 // uadd8 mi r0 r12 r8 }; const byte kInstruction_uadd8_pl_r3_r12_r12[] = { 0x9c, 0x3f, 0x5c, 0x56 // uadd8 pl r3 r12 r12 }; const byte kInstruction_uadd8_eq_r8_r12_r5[] = { 0x95, 0x8f, 0x5c, 0x06 // uadd8 eq r8 r12 r5 }; const byte kInstruction_uadd8_cc_r7_r8_r1[] = { 0x91, 0x7f, 0x58, 0x36 // uadd8 cc r7 r8 r1 }; const byte kInstruction_uadd8_hi_r2_r13_r10[] = { 0x9a, 0x2f, 0x5d, 0x86 // uadd8 hi r2 r13 r10 }; const byte kInstruction_uadd8_al_r7_r10_r10[] = { 0x9a, 0x7f, 0x5a, 0xe6 // uadd8 al r7 r10 r10 }; const byte kInstruction_uadd8_vc_r1_r12_r2[] = { 0x92, 0x1f, 0x5c, 0x76 // uadd8 vc r1 r12 r2 }; const byte kInstruction_uadd8_cc_r8_r5_r8[] = { 0x98, 0x8f, 0x55, 0x36 // uadd8 cc r8 r5 r8 }; const byte kInstruction_uadd8_ls_r3_r7_r9[] = { 0x99, 0x3f, 0x57, 0x96 // uadd8 ls r3 r7 r9 }; const byte kInstruction_uadd8_al_r8_r10_r8[] = { 0x98, 0x8f, 0x5a, 0xe6 // uadd8 al r8 r10 r8 }; const byte kInstruction_uadd8_lt_r4_r12_r10[] = { 0x9a, 0x4f, 0x5c, 0xb6 // uadd8 lt r4 r12 r10 }; const byte kInstruction_uadd8_ge_r10_r5_r11[] = { 0x9b, 0xaf, 0x55, 0xa6 // uadd8 ge r10 r5 r11 }; const byte kInstruction_uadd8_ls_r3_r14_r4[] = { 0x94, 0x3f, 0x5e, 0x96 // uadd8 ls r3 r14 r4 }; const byte kInstruction_uadd8_hi_r3_r6_r12[] = { 0x9c, 0x3f, 0x56, 0x86 // uadd8 hi r3 r6 r12 }; const byte kInstruction_uadd8_hi_r6_r0_r4[] = { 0x94, 0x6f, 0x50, 0x86 // uadd8 hi r6 r0 r4 }; const byte kInstruction_uadd8_al_r11_r6_r0[] = { 0x90, 0xbf, 0x56, 0xe6 // uadd8 al r11 r6 r0 }; const byte kInstruction_uadd8_mi_r3_r1_r9[] = { 0x99, 0x3f, 0x51, 0x46 // uadd8 mi r3 r1 r9 }; const byte kInstruction_uadd8_mi_r12_r13_r0[] = { 0x90, 0xcf, 0x5d, 0x46 // uadd8 mi r12 r13 r0 }; const byte kInstruction_uadd8_le_r1_r2_r5[] = { 0x95, 0x1f, 0x52, 0xd6 // uadd8 le r1 r2 r5 }; const byte kInstruction_uadd8_hi_r4_r3_r14[] = { 0x9e, 0x4f, 0x53, 0x86 // uadd8 hi r4 r3 r14 }; const byte kInstruction_uadd8_eq_r6_r11_r11[] = { 0x9b, 0x6f, 0x5b, 0x06 // uadd8 eq r6 r11 r11 }; const byte kInstruction_uadd8_cc_r14_r11_r14[] = { 0x9e, 0xef, 0x5b, 0x36 // uadd8 cc r14 r11 r14 }; const byte kInstruction_uadd8_hi_r4_r10_r0[] = { 0x90, 0x4f, 0x5a, 0x86 // uadd8 hi r4 r10 r0 }; const byte kInstruction_uadd8_cc_r7_r11_r1[] = { 0x91, 0x7f, 0x5b, 0x36 // uadd8 cc r7 r11 r1 }; const byte kInstruction_uadd8_mi_r14_r6_r10[] = { 0x9a, 0xef, 0x56, 0x46 // uadd8 mi r14 r6 r10 }; const byte kInstruction_uadd8_eq_r2_r0_r11[] = { 0x9b, 0x2f, 0x50, 0x06 // uadd8 eq r2 r0 r11 }; const byte kInstruction_uadd8_mi_r13_r5_r12[] = { 0x9c, 0xdf, 0x55, 0x46 // uadd8 mi r13 r5 r12 }; const byte kInstruction_uadd8_eq_r2_r12_r5[] = { 0x95, 0x2f, 0x5c, 0x06 // uadd8 eq r2 r12 r5 }; const byte kInstruction_uadd8_le_r12_r0_r2[] = { 0x92, 0xcf, 0x50, 0xd6 // uadd8 le r12 r0 r2 }; const byte kInstruction_uadd8_vc_r10_r10_r9[] = { 0x99, 0xaf, 0x5a, 0x76 // uadd8 vc r10 r10 r9 }; const byte kInstruction_uadd8_ls_r11_r11_r8[] = { 0x98, 0xbf, 0x5b, 0x96 // uadd8 ls r11 r11 r8 }; const byte kInstruction_uadd8_hi_r10_r11_r9[] = { 0x99, 0xaf, 0x5b, 0x86 // uadd8 hi r10 r11 r9 }; const byte kInstruction_uadd8_vs_r7_r12_r14[] = { 0x9e, 0x7f, 0x5c, 0x66 // uadd8 vs r7 r12 r14 }; const byte kInstruction_uadd8_gt_r11_r14_r12[] = { 0x9c, 0xbf, 0x5e, 0xc6 // uadd8 gt r11 r14 r12 }; const byte kInstruction_uadd8_vs_r0_r12_r8[] = { 0x98, 0x0f, 0x5c, 0x66 // uadd8 vs r0 r12 r8 }; const byte kInstruction_uadd8_al_r0_r5_r7[] = { 0x97, 0x0f, 0x55, 0xe6 // uadd8 al r0 r5 r7 }; const byte kInstruction_uadd8_hi_r5_r13_r8[] = { 0x98, 0x5f, 0x5d, 0x86 // uadd8 hi r5 r13 r8 }; const byte kInstruction_uadd8_le_r9_r9_r7[] = { 0x97, 0x9f, 0x59, 0xd6 // uadd8 le r9 r9 r7 }; const byte kInstruction_uadd8_cc_r4_r9_r5[] = { 0x95, 0x4f, 0x59, 0x36 // uadd8 cc r4 r9 r5 }; const byte kInstruction_uadd8_vs_r8_r1_r3[] = { 0x93, 0x8f, 0x51, 0x66 // uadd8 vs r8 r1 r3 }; const byte kInstruction_uadd8_cc_r0_r10_r12[] = { 0x9c, 0x0f, 0x5a, 0x36 // uadd8 cc r0 r10 r12 }; const byte kInstruction_uadd8_eq_r7_r14_r0[] = { 0x90, 0x7f, 0x5e, 0x06 // uadd8 eq r7 r14 r0 }; const byte kInstruction_uadd8_vs_r12_r9_r11[] = { 0x9b, 0xcf, 0x59, 0x66 // uadd8 vs r12 r9 r11 }; const byte kInstruction_uadd8_gt_r5_r9_r11[] = { 0x9b, 0x5f, 0x59, 0xc6 // uadd8 gt r5 r9 r11 }; const byte kInstruction_uadd8_cs_r14_r13_r7[] = { 0x97, 0xef, 0x5d, 0x26 // uadd8 cs r14 r13 r7 }; const byte kInstruction_uadd8_mi_r11_r3_r10[] = { 0x9a, 0xbf, 0x53, 0x46 // uadd8 mi r11 r3 r10 }; const byte kInstruction_uadd8_hi_r11_r8_r12[] = { 0x9c, 0xbf, 0x58, 0x86 // uadd8 hi r11 r8 r12 }; const byte kInstruction_uadd8_cs_r3_r8_r13[] = { 0x9d, 0x3f, 0x58, 0x26 // uadd8 cs r3 r8 r13 }; const byte kInstruction_uadd8_pl_r10_r12_r6[] = { 0x96, 0xaf, 0x5c, 0x56 // uadd8 pl r10 r12 r6 }; const byte kInstruction_uadd8_vc_r7_r3_r2[] = { 0x92, 0x7f, 0x53, 0x76 // uadd8 vc r7 r3 r2 }; const byte kInstruction_uadd8_mi_r9_r0_r8[] = { 0x98, 0x9f, 0x50, 0x46 // uadd8 mi r9 r0 r8 }; const byte kInstruction_uadd8_eq_r2_r13_r7[] = { 0x97, 0x2f, 0x5d, 0x06 // uadd8 eq r2 r13 r7 }; const byte kInstruction_uadd8_ne_r2_r14_r0[] = { 0x90, 0x2f, 0x5e, 0x16 // uadd8 ne r2 r14 r0 }; const byte kInstruction_uadd8_vs_r4_r10_r0[] = { 0x90, 0x4f, 0x5a, 0x66 // uadd8 vs r4 r10 r0 }; const byte kInstruction_uadd8_ls_r0_r2_r2[] = { 0x92, 0x0f, 0x52, 0x96 // uadd8 ls r0 r2 r2 }; const byte kInstruction_uadd8_cc_r1_r6_r0[] = { 0x90, 0x1f, 0x56, 0x36 // uadd8 cc r1 r6 r0 }; const byte kInstruction_uadd8_lt_r12_r0_r8[] = { 0x98, 0xcf, 0x50, 0xb6 // uadd8 lt r12 r0 r8 }; const byte kInstruction_uadd8_cc_r9_r3_r14[] = { 0x9e, 0x9f, 0x53, 0x36 // uadd8 cc r9 r3 r14 }; const byte kInstruction_uadd8_vs_r7_r9_r1[] = { 0x91, 0x7f, 0x59, 0x66 // uadd8 vs r7 r9 r1 }; const byte kInstruction_uadd8_eq_r11_r9_r14[] = { 0x9e, 0xbf, 0x59, 0x06 // uadd8 eq r11 r9 r14 }; const byte kInstruction_uadd8_pl_r6_r10_r4[] = { 0x94, 0x6f, 0x5a, 0x56 // uadd8 pl r6 r10 r4 }; const byte kInstruction_uadd8_ne_r8_r5_r6[] = { 0x96, 0x8f, 0x55, 0x16 // uadd8 ne r8 r5 r6 }; const byte kInstruction_uadd8_cs_r0_r6_r2[] = { 0x92, 0x0f, 0x56, 0x26 // uadd8 cs r0 r6 r2 }; const byte kInstruction_uadd8_eq_r11_r12_r4[] = { 0x94, 0xbf, 0x5c, 0x06 // uadd8 eq r11 r12 r4 }; const byte kInstruction_uadd8_lt_r14_r3_r14[] = { 0x9e, 0xef, 0x53, 0xb6 // uadd8 lt r14 r3 r14 }; const byte kInstruction_uadd8_le_r7_r12_r14[] = { 0x9e, 0x7f, 0x5c, 0xd6 // uadd8 le r7 r12 r14 }; const byte kInstruction_uadd8_hi_r2_r9_r9[] = { 0x99, 0x2f, 0x59, 0x86 // uadd8 hi r2 r9 r9 }; const byte kInstruction_uadd8_ne_r8_r1_r0[] = { 0x90, 0x8f, 0x51, 0x16 // uadd8 ne r8 r1 r0 }; const byte kInstruction_uadd8_cc_r5_r11_r2[] = { 0x92, 0x5f, 0x5b, 0x36 // uadd8 cc r5 r11 r2 }; const byte kInstruction_uadd8_hi_r0_r1_r2[] = { 0x92, 0x0f, 0x51, 0x86 // uadd8 hi r0 r1 r2 }; const byte kInstruction_uadd8_al_r4_r9_r4[] = { 0x94, 0x4f, 0x59, 0xe6 // uadd8 al r4 r9 r4 }; const byte kInstruction_uadd8_cs_r12_r7_r14[] = { 0x9e, 0xcf, 0x57, 0x26 // uadd8 cs r12 r7 r14 }; const byte kInstruction_uadd8_cc_r4_r12_r10[] = { 0x9a, 0x4f, 0x5c, 0x36 // uadd8 cc r4 r12 r10 }; const byte kInstruction_uadd8_al_r3_r5_r10[] = { 0x9a, 0x3f, 0x55, 0xe6 // uadd8 al r3 r5 r10 }; const byte kInstruction_uadd8_mi_r5_r3_r7[] = { 0x97, 0x5f, 0x53, 0x46 // uadd8 mi r5 r3 r7 }; const byte kInstruction_uadd8_ls_r10_r6_r2[] = { 0x92, 0xaf, 0x56, 0x96 // uadd8 ls r10 r6 r2 }; const byte kInstruction_uadd8_mi_r0_r12_r11[] = { 0x9b, 0x0f, 0x5c, 0x46 // uadd8 mi r0 r12 r11 }; const byte kInstruction_uadd8_vc_r12_r5_r6[] = { 0x96, 0xcf, 0x55, 0x76 // uadd8 vc r12 r5 r6 }; const byte kInstruction_uadd8_cs_r3_r9_r4[] = { 0x94, 0x3f, 0x59, 0x26 // uadd8 cs r3 r9 r4 }; const byte kInstruction_uadd8_ls_r4_r9_r11[] = { 0x9b, 0x4f, 0x59, 0x96 // uadd8 ls r4 r9 r11 }; const byte kInstruction_uadd8_le_r14_r8_r13[] = { 0x9d, 0xef, 0x58, 0xd6 // uadd8 le r14 r8 r13 }; const byte kInstruction_uadd8_gt_r4_r10_r8[] = { 0x98, 0x4f, 0x5a, 0xc6 // uadd8 gt r4 r10 r8 }; const byte kInstruction_uadd8_al_r6_r9_r9[] = { 0x99, 0x6f, 0x59, 0xe6 // uadd8 al r6 r9 r9 }; const byte kInstruction_uadd8_ne_r8_r5_r12[] = { 0x9c, 0x8f, 0x55, 0x16 // uadd8 ne r8 r5 r12 }; const byte kInstruction_uadd8_ne_r0_r4_r8[] = { 0x98, 0x0f, 0x54, 0x16 // uadd8 ne r0 r4 r8 }; const byte kInstruction_uadd8_mi_r7_r13_r3[] = { 0x93, 0x7f, 0x5d, 0x46 // uadd8 mi r7 r13 r3 }; const byte kInstruction_uadd8_cc_r11_r7_r0[] = { 0x90, 0xbf, 0x57, 0x36 // uadd8 cc r11 r7 r0 }; const byte kInstruction_uadd8_hi_r1_r0_r12[] = { 0x9c, 0x1f, 0x50, 0x86 // uadd8 hi r1 r0 r12 }; const byte kInstruction_uadd8_lt_r8_r9_r3[] = { 0x93, 0x8f, 0x59, 0xb6 // uadd8 lt r8 r9 r3 }; const byte kInstruction_uadd8_al_r0_r2_r1[] = { 0x91, 0x0f, 0x52, 0xe6 // uadd8 al r0 r2 r1 }; const byte kInstruction_uadd8_vs_r4_r3_r14[] = { 0x9e, 0x4f, 0x53, 0x66 // uadd8 vs r4 r3 r14 }; const byte kInstruction_uadd8_ge_r2_r11_r1[] = { 0x91, 0x2f, 0x5b, 0xa6 // uadd8 ge r2 r11 r1 }; const byte kInstruction_uadd8_lt_r12_r9_r6[] = { 0x96, 0xcf, 0x59, 0xb6 // uadd8 lt r12 r9 r6 }; const byte kInstruction_uadd8_ls_r8_r2_r7[] = { 0x97, 0x8f, 0x52, 0x96 // uadd8 ls r8 r2 r7 }; const byte kInstruction_uadd8_le_r8_r13_r3[] = { 0x93, 0x8f, 0x5d, 0xd6 // uadd8 le r8 r13 r3 }; const byte kInstruction_uadd8_eq_r11_r13_r14[] = { 0x9e, 0xbf, 0x5d, 0x06 // uadd8 eq r11 r13 r14 }; const byte kInstruction_uadd8_lt_r1_r6_r13[] = { 0x9d, 0x1f, 0x56, 0xb6 // uadd8 lt r1 r6 r13 }; const byte kInstruction_uadd8_cs_r3_r8_r11[] = { 0x9b, 0x3f, 0x58, 0x26 // uadd8 cs r3 r8 r11 }; const byte kInstruction_uadd8_pl_r12_r5_r4[] = { 0x94, 0xcf, 0x55, 0x56 // uadd8 pl r12 r5 r4 }; const byte kInstruction_uadd8_eq_r8_r7_r2[] = { 0x92, 0x8f, 0x57, 0x06 // uadd8 eq r8 r7 r2 }; const byte kInstruction_uadd8_ls_r2_r12_r2[] = { 0x92, 0x2f, 0x5c, 0x96 // uadd8 ls r2 r12 r2 }; const byte kInstruction_uadd8_le_r14_r2_r3[] = { 0x93, 0xef, 0x52, 0xd6 // uadd8 le r14 r2 r3 }; const byte kInstruction_uadd8_ge_r10_r11_r6[] = { 0x96, 0xaf, 0x5b, 0xa6 // uadd8 ge r10 r11 r6 }; const byte kInstruction_uadd8_hi_r0_r2_r2[] = { 0x92, 0x0f, 0x52, 0x86 // uadd8 hi r0 r2 r2 }; const byte kInstruction_uadd8_ge_r2_r0_r2[] = { 0x92, 0x2f, 0x50, 0xa6 // uadd8 ge r2 r0 r2 }; const byte kInstruction_uadd8_vs_r11_r14_r0[] = { 0x90, 0xbf, 0x5e, 0x66 // uadd8 vs r11 r14 r0 }; const byte kInstruction_uadd8_lt_r2_r0_r1[] = { 0x91, 0x2f, 0x50, 0xb6 // uadd8 lt r2 r0 r1 }; const byte kInstruction_uadd8_cs_r2_r5_r11[] = { 0x9b, 0x2f, 0x55, 0x26 // uadd8 cs r2 r5 r11 }; const byte kInstruction_uadd8_ls_r7_r14_r5[] = { 0x95, 0x7f, 0x5e, 0x96 // uadd8 ls r7 r14 r5 }; const byte kInstruction_uadd8_pl_r0_r0_r3[] = { 0x93, 0x0f, 0x50, 0x56 // uadd8 pl r0 r0 r3 }; const byte kInstruction_uadd8_ge_r6_r8_r8[] = { 0x98, 0x6f, 0x58, 0xa6 // uadd8 ge r6 r8 r8 }; const byte kInstruction_uadd8_le_r11_r1_r10[] = { 0x9a, 0xbf, 0x51, 0xd6 // uadd8 le r11 r1 r10 }; const byte kInstruction_uadd8_vs_r5_r2_r7[] = { 0x97, 0x5f, 0x52, 0x66 // uadd8 vs r5 r2 r7 }; const byte kInstruction_uadd8_ne_r4_r4_r8[] = { 0x98, 0x4f, 0x54, 0x16 // uadd8 ne r4 r4 r8 }; const byte kInstruction_uadd8_cc_r9_r14_r13[] = { 0x9d, 0x9f, 0x5e, 0x36 // uadd8 cc r9 r14 r13 }; const byte kInstruction_uadd8_hi_r14_r6_r3[] = { 0x93, 0xef, 0x56, 0x86 // uadd8 hi r14 r6 r3 }; const byte kInstruction_uadd8_al_r0_r8_r0[] = { 0x90, 0x0f, 0x58, 0xe6 // uadd8 al r0 r8 r0 }; const byte kInstruction_uadd8_lt_r6_r11_r1[] = { 0x91, 0x6f, 0x5b, 0xb6 // uadd8 lt r6 r11 r1 }; const byte kInstruction_uadd8_ge_r7_r6_r12[] = { 0x9c, 0x7f, 0x56, 0xa6 // uadd8 ge r7 r6 r12 }; const byte kInstruction_uadd8_cs_r4_r6_r14[] = { 0x9e, 0x4f, 0x56, 0x26 // uadd8 cs r4 r6 r14 }; const byte kInstruction_uadd8_cs_r7_r6_r7[] = { 0x97, 0x7f, 0x56, 0x26 // uadd8 cs r7 r6 r7 }; const byte kInstruction_uadd8_cs_r3_r7_r10[] = { 0x9a, 0x3f, 0x57, 0x26 // uadd8 cs r3 r7 r10 }; const byte kInstruction_uadd8_ne_r0_r2_r1[] = { 0x91, 0x0f, 0x52, 0x16 // uadd8 ne r0 r2 r1 }; const byte kInstruction_uadd8_vs_r9_r10_r13[] = { 0x9d, 0x9f, 0x5a, 0x66 // uadd8 vs r9 r10 r13 }; const byte kInstruction_uadd8_vc_r11_r14_r12[] = { 0x9c, 0xbf, 0x5e, 0x76 // uadd8 vc r11 r14 r12 }; const byte kInstruction_uadd8_ge_r14_r8_r7[] = { 0x97, 0xef, 0x58, 0xa6 // uadd8 ge r14 r8 r7 }; const byte kInstruction_uadd8_lt_r13_r0_r11[] = { 0x9b, 0xdf, 0x50, 0xb6 // uadd8 lt r13 r0 r11 }; const byte kInstruction_uadd8_lt_r14_r13_r4[] = { 0x94, 0xef, 0x5d, 0xb6 // uadd8 lt r14 r13 r4 }; const byte kInstruction_uadd8_al_r1_r10_r9[] = { 0x99, 0x1f, 0x5a, 0xe6 // uadd8 al r1 r10 r9 }; const byte kInstruction_uadd8_ge_r11_r14_r11[] = { 0x9b, 0xbf, 0x5e, 0xa6 // uadd8 ge r11 r14 r11 }; const byte kInstruction_uadd8_cs_r11_r4_r11[] = { 0x9b, 0xbf, 0x54, 0x26 // uadd8 cs r11 r4 r11 }; const byte kInstruction_uadd8_ge_r0_r14_r7[] = { 0x97, 0x0f, 0x5e, 0xa6 // uadd8 ge r0 r14 r7 }; const byte kInstruction_uadd8_mi_r1_r2_r9[] = { 0x99, 0x1f, 0x52, 0x46 // uadd8 mi r1 r2 r9 }; const byte kInstruction_uadd8_eq_r5_r12_r3[] = { 0x93, 0x5f, 0x5c, 0x06 // uadd8 eq r5 r12 r3 }; const byte kInstruction_uadd8_ge_r1_r5_r12[] = { 0x9c, 0x1f, 0x55, 0xa6 // uadd8 ge r1 r5 r12 }; const byte kInstruction_uadd8_lt_r10_r11_r4[] = { 0x94, 0xaf, 0x5b, 0xb6 // uadd8 lt r10 r11 r4 }; const byte kInstruction_uadd8_le_r1_r1_r5[] = { 0x95, 0x1f, 0x51, 0xd6 // uadd8 le r1 r1 r5 }; const byte kInstruction_uadd8_al_r9_r1_r8[] = { 0x98, 0x9f, 0x51, 0xe6 // uadd8 al r9 r1 r8 }; const byte kInstruction_uadd8_ne_r6_r8_r4[] = { 0x94, 0x6f, 0x58, 0x16 // uadd8 ne r6 r8 r4 }; const byte kInstruction_uadd8_ge_r12_r2_r9[] = { 0x99, 0xcf, 0x52, 0xa6 // uadd8 ge r12 r2 r9 }; const byte kInstruction_uadd8_pl_r4_r3_r10[] = { 0x9a, 0x4f, 0x53, 0x56 // uadd8 pl r4 r3 r10 }; const byte kInstruction_uadd8_eq_r14_r4_r11[] = { 0x9b, 0xef, 0x54, 0x06 // uadd8 eq r14 r4 r11 }; const byte kInstruction_uadd8_cc_r9_r7_r6[] = { 0x96, 0x9f, 0x57, 0x36 // uadd8 cc r9 r7 r6 }; const byte kInstruction_uadd8_ge_r12_r4_r5[] = { 0x95, 0xcf, 0x54, 0xa6 // uadd8 ge r12 r4 r5 }; const byte kInstruction_uadd8_hi_r2_r3_r4[] = { 0x94, 0x2f, 0x53, 0x86 // uadd8 hi r2 r3 r4 }; const byte kInstruction_uadd8_cs_r0_r3_r1[] = { 0x91, 0x0f, 0x53, 0x26 // uadd8 cs r0 r3 r1 }; const byte kInstruction_uadd8_hi_r6_r2_r8[] = { 0x98, 0x6f, 0x52, 0x86 // uadd8 hi r6 r2 r8 }; const byte kInstruction_uadd8_cc_r3_r14_r13[] = { 0x9d, 0x3f, 0x5e, 0x36 // uadd8 cc r3 r14 r13 }; const byte kInstruction_uadd8_gt_r11_r4_r7[] = { 0x97, 0xbf, 0x54, 0xc6 // uadd8 gt r11 r4 r7 }; const byte kInstruction_uadd8_hi_r5_r0_r12[] = { 0x9c, 0x5f, 0x50, 0x86 // uadd8 hi r5 r0 r12 }; const byte kInstruction_uadd8_gt_r0_r14_r14[] = { 0x9e, 0x0f, 0x5e, 0xc6 // uadd8 gt r0 r14 r14 }; const byte kInstruction_uadd8_hi_r9_r0_r10[] = { 0x9a, 0x9f, 0x50, 0x86 // uadd8 hi r9 r0 r10 }; const byte kInstruction_uadd8_vc_r7_r11_r8[] = { 0x98, 0x7f, 0x5b, 0x76 // uadd8 vc r7 r11 r8 }; const byte kInstruction_uadd8_pl_r11_r9_r6[] = { 0x96, 0xbf, 0x59, 0x56 // uadd8 pl r11 r9 r6 }; const byte kInstruction_uadd8_al_r3_r3_r7[] = { 0x97, 0x3f, 0x53, 0xe6 // uadd8 al r3 r3 r7 }; const byte kInstruction_uadd8_mi_r5_r7_r9[] = { 0x99, 0x5f, 0x57, 0x46 // uadd8 mi r5 r7 r9 }; const byte kInstruction_uadd8_cc_r11_r2_r4[] = { 0x94, 0xbf, 0x52, 0x36 // uadd8 cc r11 r2 r4 }; const byte kInstruction_uadd8_cc_r9_r13_r10[] = { 0x9a, 0x9f, 0x5d, 0x36 // uadd8 cc r9 r13 r10 }; const byte kInstruction_uadd8_al_r5_r2_r6[] = { 0x96, 0x5f, 0x52, 0xe6 // uadd8 al r5 r2 r6 }; const byte kInstruction_uadd8_ge_r9_r4_r6[] = { 0x96, 0x9f, 0x54, 0xa6 // uadd8 ge r9 r4 r6 }; const byte kInstruction_uadd8_ls_r3_r3_r4[] = { 0x94, 0x3f, 0x53, 0x96 // uadd8 ls r3 r3 r4 }; const byte kInstruction_uadd8_ge_r14_r1_r8[] = { 0x98, 0xef, 0x51, 0xa6 // uadd8 ge r14 r1 r8 }; const byte kInstruction_uadd8_ls_r7_r12_r7[] = { 0x97, 0x7f, 0x5c, 0x96 // uadd8 ls r7 r12 r7 }; const byte kInstruction_uadd8_al_r11_r10_r5[] = { 0x95, 0xbf, 0x5a, 0xe6 // uadd8 al r11 r10 r5 }; const byte kInstruction_uadd8_al_r7_r4_r6[] = { 0x96, 0x7f, 0x54, 0xe6 // uadd8 al r7 r4 r6 }; const byte kInstruction_uadd8_vs_r12_r4_r10[] = { 0x9a, 0xcf, 0x54, 0x66 // uadd8 vs r12 r4 r10 }; const byte kInstruction_uadd8_eq_r4_r4_r4[] = { 0x94, 0x4f, 0x54, 0x06 // uadd8 eq r4 r4 r4 }; const byte kInstruction_uadd8_vs_r6_r6_r12[] = { 0x9c, 0x6f, 0x56, 0x66 // uadd8 vs r6 r6 r12 }; const byte kInstruction_uadd8_pl_r9_r3_r5[] = { 0x95, 0x9f, 0x53, 0x56 // uadd8 pl r9 r3 r5 }; const byte kInstruction_uadd8_eq_r6_r5_r13[] = { 0x9d, 0x6f, 0x55, 0x06 // uadd8 eq r6 r5 r13 }; const byte kInstruction_uadd8_cc_r8_r2_r12[] = { 0x9c, 0x8f, 0x52, 0x36 // uadd8 cc r8 r2 r12 }; const byte kInstruction_uadd8_le_r4_r2_r0[] = { 0x90, 0x4f, 0x52, 0xd6 // uadd8 le r4 r2 r0 }; const byte kInstruction_uadd8_lt_r7_r9_r8[] = { 0x98, 0x7f, 0x59, 0xb6 // uadd8 lt r7 r9 r8 }; const byte kInstruction_uadd8_le_r4_r7_r11[] = { 0x9b, 0x4f, 0x57, 0xd6 // uadd8 le r4 r7 r11 }; const byte kInstruction_uadd8_eq_r5_r7_r5[] = { 0x95, 0x5f, 0x57, 0x06 // uadd8 eq r5 r7 r5 }; const byte kInstruction_uadd8_vc_r10_r7_r12[] = { 0x9c, 0xaf, 0x57, 0x76 // uadd8 vc r10 r7 r12 }; const byte kInstruction_uadd8_eq_r7_r10_r6[] = { 0x96, 0x7f, 0x5a, 0x06 // uadd8 eq r7 r10 r6 }; const byte kInstruction_uadd8_pl_r1_r12_r2[] = { 0x92, 0x1f, 0x5c, 0x56 // uadd8 pl r1 r12 r2 }; const byte kInstruction_uadd8_le_r14_r6_r6[] = { 0x96, 0xef, 0x56, 0xd6 // uadd8 le r14 r6 r6 }; const byte kInstruction_uadd8_ne_r3_r8_r8[] = { 0x98, 0x3f, 0x58, 0x16 // uadd8 ne r3 r8 r8 }; const byte kInstruction_uadd8_eq_r4_r12_r8[] = { 0x98, 0x4f, 0x5c, 0x06 // uadd8 eq r4 r12 r8 }; const byte kInstruction_uadd8_ge_r11_r2_r3[] = { 0x93, 0xbf, 0x52, 0xa6 // uadd8 ge r11 r2 r3 }; const byte kInstruction_uadd8_hi_r12_r6_r11[] = { 0x9b, 0xcf, 0x56, 0x86 // uadd8 hi r12 r6 r11 }; const byte kInstruction_uadd8_cs_r4_r5_r10[] = { 0x9a, 0x4f, 0x55, 0x26 // uadd8 cs r4 r5 r10 }; const byte kInstruction_uadd8_ge_r10_r2_r10[] = { 0x9a, 0xaf, 0x52, 0xa6 // uadd8 ge r10 r2 r10 }; const byte kInstruction_uadd8_ge_r5_r14_r6[] = { 0x96, 0x5f, 0x5e, 0xa6 // uadd8 ge r5 r14 r6 }; const byte kInstruction_uadd8_gt_r13_r7_r5[] = { 0x95, 0xdf, 0x57, 0xc6 // uadd8 gt r13 r7 r5 }; const byte kInstruction_uadd8_ge_r13_r4_r12[] = { 0x9c, 0xdf, 0x54, 0xa6 // uadd8 ge r13 r4 r12 }; const byte kInstruction_uadd8_lt_r8_r10_r14[] = { 0x9e, 0x8f, 0x5a, 0xb6 // uadd8 lt r8 r10 r14 }; const byte kInstruction_uadd8_le_r4_r3_r13[] = { 0x9d, 0x4f, 0x53, 0xd6 // uadd8 le r4 r3 r13 }; const byte kInstruction_uadd8_pl_r0_r9_r0[] = { 0x90, 0x0f, 0x59, 0x56 // uadd8 pl r0 r9 r0 }; const byte kInstruction_uadd8_eq_r2_r3_r1[] = { 0x91, 0x2f, 0x53, 0x06 // uadd8 eq r2 r3 r1 }; const byte kInstruction_uadd8_vc_r0_r0_r3[] = { 0x93, 0x0f, 0x50, 0x76 // uadd8 vc r0 r0 r3 }; const byte kInstruction_uadd8_mi_r10_r8_r11[] = { 0x9b, 0xaf, 0x58, 0x46 // uadd8 mi r10 r8 r11 }; const byte kInstruction_uadd8_mi_r5_r14_r14[] = { 0x9e, 0x5f, 0x5e, 0x46 // uadd8 mi r5 r14 r14 }; const byte kInstruction_uadd8_gt_r5_r11_r2[] = { 0x92, 0x5f, 0x5b, 0xc6 // uadd8 gt r5 r11 r2 }; const byte kInstruction_uadd8_al_r4_r7_r11[] = { 0x9b, 0x4f, 0x57, 0xe6 // uadd8 al r4 r7 r11 }; const TestResult kReferenceuadd8[] = { { ARRAY_SIZE(kInstruction_uadd8_hi_r1_r9_r5), kInstruction_uadd8_hi_r1_r9_r5, }, { ARRAY_SIZE(kInstruction_uadd8_pl_r8_r6_r2), kInstruction_uadd8_pl_r8_r6_r2, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r5_r8_r2), kInstruction_uadd8_hi_r5_r8_r2, }, { ARRAY_SIZE(kInstruction_uadd8_vc_r9_r2_r7), kInstruction_uadd8_vc_r9_r2_r7, }, { ARRAY_SIZE(kInstruction_uadd8_lt_r4_r6_r3), kInstruction_uadd8_lt_r4_r6_r3, }, { ARRAY_SIZE(kInstruction_uadd8_le_r11_r6_r2), kInstruction_uadd8_le_r11_r6_r2, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r8_r14_r4), kInstruction_uadd8_cc_r8_r14_r4, }, { ARRAY_SIZE(kInstruction_uadd8_le_r5_r14_r6), kInstruction_uadd8_le_r5_r14_r6, }, { ARRAY_SIZE(kInstruction_uadd8_lt_r6_r1_r0), kInstruction_uadd8_lt_r6_r1_r0, }, { ARRAY_SIZE(kInstruction_uadd8_lt_r5_r0_r9), kInstruction_uadd8_lt_r5_r0_r9, }, { ARRAY_SIZE(kInstruction_uadd8_le_r8_r12_r7), kInstruction_uadd8_le_r8_r12_r7, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r7_r14_r6), kInstruction_uadd8_eq_r7_r14_r6, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r7_r4_r6), kInstruction_uadd8_cs_r7_r4_r6, }, { ARRAY_SIZE(kInstruction_uadd8_gt_r9_r6_r9), kInstruction_uadd8_gt_r9_r6_r9, }, { ARRAY_SIZE(kInstruction_uadd8_ne_r13_r9_r1), kInstruction_uadd8_ne_r13_r9_r1, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r13_r1_r13), kInstruction_uadd8_ge_r13_r1_r13, }, { ARRAY_SIZE(kInstruction_uadd8_ls_r8_r10_r2), kInstruction_uadd8_ls_r8_r10_r2, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r0_r13_r5), kInstruction_uadd8_hi_r0_r13_r5, }, { ARRAY_SIZE(kInstruction_uadd8_pl_r13_r7_r8), kInstruction_uadd8_pl_r13_r7_r8, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r4_r13_r11), kInstruction_uadd8_ge_r4_r13_r11, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r5_r10_r5), kInstruction_uadd8_cs_r5_r10_r5, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r5_r4_r3), kInstruction_uadd8_cs_r5_r4_r3, }, { ARRAY_SIZE(kInstruction_uadd8_ls_r6_r14_r8), kInstruction_uadd8_ls_r6_r14_r8, }, { ARRAY_SIZE(kInstruction_uadd8_vs_r3_r8_r6), kInstruction_uadd8_vs_r3_r8_r6, }, { ARRAY_SIZE(kInstruction_uadd8_vc_r7_r12_r3), kInstruction_uadd8_vc_r7_r12_r3, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r1_r4_r1), kInstruction_uadd8_ge_r1_r4_r1, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r4_r7_r10), kInstruction_uadd8_cc_r4_r7_r10, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r2_r0_r13), kInstruction_uadd8_cc_r2_r0_r13, }, { ARRAY_SIZE(kInstruction_uadd8_vs_r9_r6_r8), kInstruction_uadd8_vs_r9_r6_r8, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r14_r11_r13), kInstruction_uadd8_cs_r14_r11_r13, }, { ARRAY_SIZE(kInstruction_uadd8_pl_r5_r8_r4), kInstruction_uadd8_pl_r5_r8_r4, }, { ARRAY_SIZE(kInstruction_uadd8_pl_r2_r3_r7), kInstruction_uadd8_pl_r2_r3_r7, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r7_r12_r14), kInstruction_uadd8_cs_r7_r12_r14, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r6_r6_r1), kInstruction_uadd8_hi_r6_r6_r1, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r6_r9_r6), kInstruction_uadd8_cc_r6_r9_r6, }, { ARRAY_SIZE(kInstruction_uadd8_ne_r12_r12_r0), kInstruction_uadd8_ne_r12_r12_r0, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r9_r3_r8), kInstruction_uadd8_cc_r9_r3_r8, }, { ARRAY_SIZE(kInstruction_uadd8_mi_r13_r6_r1), kInstruction_uadd8_mi_r13_r6_r1, }, { ARRAY_SIZE(kInstruction_uadd8_lt_r4_r8_r6), kInstruction_uadd8_lt_r4_r8_r6, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r11_r5_r9), kInstruction_uadd8_hi_r11_r5_r9, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r6_r10_r6), kInstruction_uadd8_cc_r6_r10_r6, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r10_r10_r5), kInstruction_uadd8_eq_r10_r10_r5, }, { ARRAY_SIZE(kInstruction_uadd8_al_r5_r4_r11), kInstruction_uadd8_al_r5_r4_r11, }, { ARRAY_SIZE(kInstruction_uadd8_pl_r11_r11_r2), kInstruction_uadd8_pl_r11_r11_r2, }, { ARRAY_SIZE(kInstruction_uadd8_ls_r6_r14_r12), kInstruction_uadd8_ls_r6_r14_r12, }, { ARRAY_SIZE(kInstruction_uadd8_vc_r7_r7_r2), kInstruction_uadd8_vc_r7_r7_r2, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r10_r8_r4), kInstruction_uadd8_eq_r10_r8_r4, }, { ARRAY_SIZE(kInstruction_uadd8_al_r14_r7_r2), kInstruction_uadd8_al_r14_r7_r2, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r3_r11_r10), kInstruction_uadd8_cs_r3_r11_r10, }, { ARRAY_SIZE(kInstruction_uadd8_ls_r11_r4_r0), kInstruction_uadd8_ls_r11_r4_r0, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r11_r8_r9), kInstruction_uadd8_hi_r11_r8_r9, }, { ARRAY_SIZE(kInstruction_uadd8_vs_r2_r14_r13), kInstruction_uadd8_vs_r2_r14_r13, }, { ARRAY_SIZE(kInstruction_uadd8_al_r1_r13_r9), kInstruction_uadd8_al_r1_r13_r9, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r3_r9_r13), kInstruction_uadd8_eq_r3_r9_r13, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r10_r3_r13), kInstruction_uadd8_ge_r10_r3_r13, }, { ARRAY_SIZE(kInstruction_uadd8_pl_r8_r5_r10), kInstruction_uadd8_pl_r8_r5_r10, }, { ARRAY_SIZE(kInstruction_uadd8_vc_r8_r11_r6), kInstruction_uadd8_vc_r8_r11_r6, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r0_r0_r5), kInstruction_uadd8_eq_r0_r0_r5, }, { ARRAY_SIZE(kInstruction_uadd8_ne_r6_r5_r8), kInstruction_uadd8_ne_r6_r5_r8, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r5_r13_r3), kInstruction_uadd8_hi_r5_r13_r3, }, { ARRAY_SIZE(kInstruction_uadd8_ne_r11_r14_r14), kInstruction_uadd8_ne_r11_r14_r14, }, { ARRAY_SIZE(kInstruction_uadd8_mi_r1_r0_r6), kInstruction_uadd8_mi_r1_r0_r6, }, { ARRAY_SIZE(kInstruction_uadd8_le_r14_r8_r2), kInstruction_uadd8_le_r14_r8_r2, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r9_r6_r5), kInstruction_uadd8_eq_r9_r6_r5, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r11_r0_r13), kInstruction_uadd8_eq_r11_r0_r13, }, { ARRAY_SIZE(kInstruction_uadd8_pl_r4_r5_r14), kInstruction_uadd8_pl_r4_r5_r14, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r13_r5_r13), kInstruction_uadd8_cs_r13_r5_r13, }, { ARRAY_SIZE(kInstruction_uadd8_mi_r0_r13_r8), kInstruction_uadd8_mi_r0_r13_r8, }, { ARRAY_SIZE(kInstruction_uadd8_lt_r2_r13_r3), kInstruction_uadd8_lt_r2_r13_r3, }, { ARRAY_SIZE(kInstruction_uadd8_ls_r8_r1_r11), kInstruction_uadd8_ls_r8_r1_r11, }, { ARRAY_SIZE(kInstruction_uadd8_vc_r14_r11_r8), kInstruction_uadd8_vc_r14_r11_r8, }, { ARRAY_SIZE(kInstruction_uadd8_lt_r4_r13_r12), kInstruction_uadd8_lt_r4_r13_r12, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r2_r1_r14), kInstruction_uadd8_eq_r2_r1_r14, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r9_r4_r14), kInstruction_uadd8_eq_r9_r4_r14, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r10_r6_r13), kInstruction_uadd8_hi_r10_r6_r13, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r12_r9_r4), kInstruction_uadd8_ge_r12_r9_r4, }, { ARRAY_SIZE(kInstruction_uadd8_le_r9_r11_r14), kInstruction_uadd8_le_r9_r11_r14, }, { ARRAY_SIZE(kInstruction_uadd8_ls_r0_r9_r5), kInstruction_uadd8_ls_r0_r9_r5, }, { ARRAY_SIZE(kInstruction_uadd8_mi_r2_r3_r8), kInstruction_uadd8_mi_r2_r3_r8, }, { ARRAY_SIZE(kInstruction_uadd8_ne_r14_r10_r14), kInstruction_uadd8_ne_r14_r10_r14, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r6_r2_r10), kInstruction_uadd8_eq_r6_r2_r10, }, { ARRAY_SIZE(kInstruction_uadd8_lt_r11_r0_r12), kInstruction_uadd8_lt_r11_r0_r12, }, { ARRAY_SIZE(kInstruction_uadd8_ne_r1_r12_r10), kInstruction_uadd8_ne_r1_r12_r10, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r1_r0_r2), kInstruction_uadd8_cc_r1_r0_r2, }, { ARRAY_SIZE(kInstruction_uadd8_al_r5_r5_r7), kInstruction_uadd8_al_r5_r5_r7, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r7_r13_r1), kInstruction_uadd8_hi_r7_r13_r1, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r4_r4_r9), kInstruction_uadd8_cs_r4_r4_r9, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r14_r4_r14), kInstruction_uadd8_eq_r14_r4_r14, }, { ARRAY_SIZE(kInstruction_uadd8_vs_r10_r5_r14), kInstruction_uadd8_vs_r10_r5_r14, }, { ARRAY_SIZE(kInstruction_uadd8_gt_r4_r3_r11), kInstruction_uadd8_gt_r4_r3_r11, }, { ARRAY_SIZE(kInstruction_uadd8_ne_r14_r10_r12), kInstruction_uadd8_ne_r14_r10_r12, }, { ARRAY_SIZE(kInstruction_uadd8_vs_r2_r11_r0), kInstruction_uadd8_vs_r2_r11_r0, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r5_r12_r7), kInstruction_uadd8_ge_r5_r12_r7, }, { ARRAY_SIZE(kInstruction_uadd8_mi_r7_r14_r6), kInstruction_uadd8_mi_r7_r14_r6, }, { ARRAY_SIZE(kInstruction_uadd8_gt_r8_r3_r8), kInstruction_uadd8_gt_r8_r3_r8, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r9_r14_r3), kInstruction_uadd8_hi_r9_r14_r3, }, { ARRAY_SIZE(kInstruction_uadd8_vc_r2_r11_r2), kInstruction_uadd8_vc_r2_r11_r2, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r11_r7_r12), kInstruction_uadd8_hi_r11_r7_r12, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r6_r4_r11), kInstruction_uadd8_cs_r6_r4_r11, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r12_r5_r9), kInstruction_uadd8_cs_r12_r5_r9, }, { ARRAY_SIZE(kInstruction_uadd8_ls_r5_r10_r5), kInstruction_uadd8_ls_r5_r10_r5, }, { ARRAY_SIZE(kInstruction_uadd8_ls_r0_r9_r13), kInstruction_uadd8_ls_r0_r9_r13, }, { ARRAY_SIZE(kInstruction_uadd8_lt_r3_r3_r5), kInstruction_uadd8_lt_r3_r3_r5, }, { ARRAY_SIZE(kInstruction_uadd8_mi_r0_r12_r8), kInstruction_uadd8_mi_r0_r12_r8, }, { ARRAY_SIZE(kInstruction_uadd8_pl_r3_r12_r12), kInstruction_uadd8_pl_r3_r12_r12, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r8_r12_r5), kInstruction_uadd8_eq_r8_r12_r5, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r7_r8_r1), kInstruction_uadd8_cc_r7_r8_r1, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r2_r13_r10), kInstruction_uadd8_hi_r2_r13_r10, }, { ARRAY_SIZE(kInstruction_uadd8_al_r7_r10_r10), kInstruction_uadd8_al_r7_r10_r10, }, { ARRAY_SIZE(kInstruction_uadd8_vc_r1_r12_r2), kInstruction_uadd8_vc_r1_r12_r2, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r8_r5_r8), kInstruction_uadd8_cc_r8_r5_r8, }, { ARRAY_SIZE(kInstruction_uadd8_ls_r3_r7_r9), kInstruction_uadd8_ls_r3_r7_r9, }, { ARRAY_SIZE(kInstruction_uadd8_al_r8_r10_r8), kInstruction_uadd8_al_r8_r10_r8, }, { ARRAY_SIZE(kInstruction_uadd8_lt_r4_r12_r10), kInstruction_uadd8_lt_r4_r12_r10, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r10_r5_r11), kInstruction_uadd8_ge_r10_r5_r11, }, { ARRAY_SIZE(kInstruction_uadd8_ls_r3_r14_r4), kInstruction_uadd8_ls_r3_r14_r4, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r3_r6_r12), kInstruction_uadd8_hi_r3_r6_r12, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r6_r0_r4), kInstruction_uadd8_hi_r6_r0_r4, }, { ARRAY_SIZE(kInstruction_uadd8_al_r11_r6_r0), kInstruction_uadd8_al_r11_r6_r0, }, { ARRAY_SIZE(kInstruction_uadd8_mi_r3_r1_r9), kInstruction_uadd8_mi_r3_r1_r9, }, { ARRAY_SIZE(kInstruction_uadd8_mi_r12_r13_r0), kInstruction_uadd8_mi_r12_r13_r0, }, { ARRAY_SIZE(kInstruction_uadd8_le_r1_r2_r5), kInstruction_uadd8_le_r1_r2_r5, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r4_r3_r14), kInstruction_uadd8_hi_r4_r3_r14, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r6_r11_r11), kInstruction_uadd8_eq_r6_r11_r11, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r14_r11_r14), kInstruction_uadd8_cc_r14_r11_r14, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r4_r10_r0), kInstruction_uadd8_hi_r4_r10_r0, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r7_r11_r1), kInstruction_uadd8_cc_r7_r11_r1, }, { ARRAY_SIZE(kInstruction_uadd8_mi_r14_r6_r10), kInstruction_uadd8_mi_r14_r6_r10, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r2_r0_r11), kInstruction_uadd8_eq_r2_r0_r11, }, { ARRAY_SIZE(kInstruction_uadd8_mi_r13_r5_r12), kInstruction_uadd8_mi_r13_r5_r12, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r2_r12_r5), kInstruction_uadd8_eq_r2_r12_r5, }, { ARRAY_SIZE(kInstruction_uadd8_le_r12_r0_r2), kInstruction_uadd8_le_r12_r0_r2, }, { ARRAY_SIZE(kInstruction_uadd8_vc_r10_r10_r9), kInstruction_uadd8_vc_r10_r10_r9, }, { ARRAY_SIZE(kInstruction_uadd8_ls_r11_r11_r8), kInstruction_uadd8_ls_r11_r11_r8, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r10_r11_r9), kInstruction_uadd8_hi_r10_r11_r9, }, { ARRAY_SIZE(kInstruction_uadd8_vs_r7_r12_r14), kInstruction_uadd8_vs_r7_r12_r14, }, { ARRAY_SIZE(kInstruction_uadd8_gt_r11_r14_r12), kInstruction_uadd8_gt_r11_r14_r12, }, { ARRAY_SIZE(kInstruction_uadd8_vs_r0_r12_r8), kInstruction_uadd8_vs_r0_r12_r8, }, { ARRAY_SIZE(kInstruction_uadd8_al_r0_r5_r7), kInstruction_uadd8_al_r0_r5_r7, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r5_r13_r8), kInstruction_uadd8_hi_r5_r13_r8, }, { ARRAY_SIZE(kInstruction_uadd8_le_r9_r9_r7), kInstruction_uadd8_le_r9_r9_r7, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r4_r9_r5), kInstruction_uadd8_cc_r4_r9_r5, }, { ARRAY_SIZE(kInstruction_uadd8_vs_r8_r1_r3), kInstruction_uadd8_vs_r8_r1_r3, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r0_r10_r12), kInstruction_uadd8_cc_r0_r10_r12, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r7_r14_r0), kInstruction_uadd8_eq_r7_r14_r0, }, { ARRAY_SIZE(kInstruction_uadd8_vs_r12_r9_r11), kInstruction_uadd8_vs_r12_r9_r11, }, { ARRAY_SIZE(kInstruction_uadd8_gt_r5_r9_r11), kInstruction_uadd8_gt_r5_r9_r11, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r14_r13_r7), kInstruction_uadd8_cs_r14_r13_r7, }, { ARRAY_SIZE(kInstruction_uadd8_mi_r11_r3_r10), kInstruction_uadd8_mi_r11_r3_r10, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r11_r8_r12), kInstruction_uadd8_hi_r11_r8_r12, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r3_r8_r13), kInstruction_uadd8_cs_r3_r8_r13, }, { ARRAY_SIZE(kInstruction_uadd8_pl_r10_r12_r6), kInstruction_uadd8_pl_r10_r12_r6, }, { ARRAY_SIZE(kInstruction_uadd8_vc_r7_r3_r2), kInstruction_uadd8_vc_r7_r3_r2, }, { ARRAY_SIZE(kInstruction_uadd8_mi_r9_r0_r8), kInstruction_uadd8_mi_r9_r0_r8, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r2_r13_r7), kInstruction_uadd8_eq_r2_r13_r7, }, { ARRAY_SIZE(kInstruction_uadd8_ne_r2_r14_r0), kInstruction_uadd8_ne_r2_r14_r0, }, { ARRAY_SIZE(kInstruction_uadd8_vs_r4_r10_r0), kInstruction_uadd8_vs_r4_r10_r0, }, { ARRAY_SIZE(kInstruction_uadd8_ls_r0_r2_r2), kInstruction_uadd8_ls_r0_r2_r2, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r1_r6_r0), kInstruction_uadd8_cc_r1_r6_r0, }, { ARRAY_SIZE(kInstruction_uadd8_lt_r12_r0_r8), kInstruction_uadd8_lt_r12_r0_r8, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r9_r3_r14), kInstruction_uadd8_cc_r9_r3_r14, }, { ARRAY_SIZE(kInstruction_uadd8_vs_r7_r9_r1), kInstruction_uadd8_vs_r7_r9_r1, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r11_r9_r14), kInstruction_uadd8_eq_r11_r9_r14, }, { ARRAY_SIZE(kInstruction_uadd8_pl_r6_r10_r4), kInstruction_uadd8_pl_r6_r10_r4, }, { ARRAY_SIZE(kInstruction_uadd8_ne_r8_r5_r6), kInstruction_uadd8_ne_r8_r5_r6, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r0_r6_r2), kInstruction_uadd8_cs_r0_r6_r2, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r11_r12_r4), kInstruction_uadd8_eq_r11_r12_r4, }, { ARRAY_SIZE(kInstruction_uadd8_lt_r14_r3_r14), kInstruction_uadd8_lt_r14_r3_r14, }, { ARRAY_SIZE(kInstruction_uadd8_le_r7_r12_r14), kInstruction_uadd8_le_r7_r12_r14, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r2_r9_r9), kInstruction_uadd8_hi_r2_r9_r9, }, { ARRAY_SIZE(kInstruction_uadd8_ne_r8_r1_r0), kInstruction_uadd8_ne_r8_r1_r0, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r5_r11_r2), kInstruction_uadd8_cc_r5_r11_r2, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r0_r1_r2), kInstruction_uadd8_hi_r0_r1_r2, }, { ARRAY_SIZE(kInstruction_uadd8_al_r4_r9_r4), kInstruction_uadd8_al_r4_r9_r4, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r12_r7_r14), kInstruction_uadd8_cs_r12_r7_r14, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r4_r12_r10), kInstruction_uadd8_cc_r4_r12_r10, }, { ARRAY_SIZE(kInstruction_uadd8_al_r3_r5_r10), kInstruction_uadd8_al_r3_r5_r10, }, { ARRAY_SIZE(kInstruction_uadd8_mi_r5_r3_r7), kInstruction_uadd8_mi_r5_r3_r7, }, { ARRAY_SIZE(kInstruction_uadd8_ls_r10_r6_r2), kInstruction_uadd8_ls_r10_r6_r2, }, { ARRAY_SIZE(kInstruction_uadd8_mi_r0_r12_r11), kInstruction_uadd8_mi_r0_r12_r11, }, { ARRAY_SIZE(kInstruction_uadd8_vc_r12_r5_r6), kInstruction_uadd8_vc_r12_r5_r6, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r3_r9_r4), kInstruction_uadd8_cs_r3_r9_r4, }, { ARRAY_SIZE(kInstruction_uadd8_ls_r4_r9_r11), kInstruction_uadd8_ls_r4_r9_r11, }, { ARRAY_SIZE(kInstruction_uadd8_le_r14_r8_r13), kInstruction_uadd8_le_r14_r8_r13, }, { ARRAY_SIZE(kInstruction_uadd8_gt_r4_r10_r8), kInstruction_uadd8_gt_r4_r10_r8, }, { ARRAY_SIZE(kInstruction_uadd8_al_r6_r9_r9), kInstruction_uadd8_al_r6_r9_r9, }, { ARRAY_SIZE(kInstruction_uadd8_ne_r8_r5_r12), kInstruction_uadd8_ne_r8_r5_r12, }, { ARRAY_SIZE(kInstruction_uadd8_ne_r0_r4_r8), kInstruction_uadd8_ne_r0_r4_r8, }, { ARRAY_SIZE(kInstruction_uadd8_mi_r7_r13_r3), kInstruction_uadd8_mi_r7_r13_r3, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r11_r7_r0), kInstruction_uadd8_cc_r11_r7_r0, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r1_r0_r12), kInstruction_uadd8_hi_r1_r0_r12, }, { ARRAY_SIZE(kInstruction_uadd8_lt_r8_r9_r3), kInstruction_uadd8_lt_r8_r9_r3, }, { ARRAY_SIZE(kInstruction_uadd8_al_r0_r2_r1), kInstruction_uadd8_al_r0_r2_r1, }, { ARRAY_SIZE(kInstruction_uadd8_vs_r4_r3_r14), kInstruction_uadd8_vs_r4_r3_r14, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r2_r11_r1), kInstruction_uadd8_ge_r2_r11_r1, }, { ARRAY_SIZE(kInstruction_uadd8_lt_r12_r9_r6), kInstruction_uadd8_lt_r12_r9_r6, }, { ARRAY_SIZE(kInstruction_uadd8_ls_r8_r2_r7), kInstruction_uadd8_ls_r8_r2_r7, }, { ARRAY_SIZE(kInstruction_uadd8_le_r8_r13_r3), kInstruction_uadd8_le_r8_r13_r3, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r11_r13_r14), kInstruction_uadd8_eq_r11_r13_r14, }, { ARRAY_SIZE(kInstruction_uadd8_lt_r1_r6_r13), kInstruction_uadd8_lt_r1_r6_r13, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r3_r8_r11), kInstruction_uadd8_cs_r3_r8_r11, }, { ARRAY_SIZE(kInstruction_uadd8_pl_r12_r5_r4), kInstruction_uadd8_pl_r12_r5_r4, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r8_r7_r2), kInstruction_uadd8_eq_r8_r7_r2, }, { ARRAY_SIZE(kInstruction_uadd8_ls_r2_r12_r2), kInstruction_uadd8_ls_r2_r12_r2, }, { ARRAY_SIZE(kInstruction_uadd8_le_r14_r2_r3), kInstruction_uadd8_le_r14_r2_r3, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r10_r11_r6), kInstruction_uadd8_ge_r10_r11_r6, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r0_r2_r2), kInstruction_uadd8_hi_r0_r2_r2, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r2_r0_r2), kInstruction_uadd8_ge_r2_r0_r2, }, { ARRAY_SIZE(kInstruction_uadd8_vs_r11_r14_r0), kInstruction_uadd8_vs_r11_r14_r0, }, { ARRAY_SIZE(kInstruction_uadd8_lt_r2_r0_r1), kInstruction_uadd8_lt_r2_r0_r1, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r2_r5_r11), kInstruction_uadd8_cs_r2_r5_r11, }, { ARRAY_SIZE(kInstruction_uadd8_ls_r7_r14_r5), kInstruction_uadd8_ls_r7_r14_r5, }, { ARRAY_SIZE(kInstruction_uadd8_pl_r0_r0_r3), kInstruction_uadd8_pl_r0_r0_r3, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r6_r8_r8), kInstruction_uadd8_ge_r6_r8_r8, }, { ARRAY_SIZE(kInstruction_uadd8_le_r11_r1_r10), kInstruction_uadd8_le_r11_r1_r10, }, { ARRAY_SIZE(kInstruction_uadd8_vs_r5_r2_r7), kInstruction_uadd8_vs_r5_r2_r7, }, { ARRAY_SIZE(kInstruction_uadd8_ne_r4_r4_r8), kInstruction_uadd8_ne_r4_r4_r8, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r9_r14_r13), kInstruction_uadd8_cc_r9_r14_r13, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r14_r6_r3), kInstruction_uadd8_hi_r14_r6_r3, }, { ARRAY_SIZE(kInstruction_uadd8_al_r0_r8_r0), kInstruction_uadd8_al_r0_r8_r0, }, { ARRAY_SIZE(kInstruction_uadd8_lt_r6_r11_r1), kInstruction_uadd8_lt_r6_r11_r1, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r7_r6_r12), kInstruction_uadd8_ge_r7_r6_r12, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r4_r6_r14), kInstruction_uadd8_cs_r4_r6_r14, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r7_r6_r7), kInstruction_uadd8_cs_r7_r6_r7, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r3_r7_r10), kInstruction_uadd8_cs_r3_r7_r10, }, { ARRAY_SIZE(kInstruction_uadd8_ne_r0_r2_r1), kInstruction_uadd8_ne_r0_r2_r1, }, { ARRAY_SIZE(kInstruction_uadd8_vs_r9_r10_r13), kInstruction_uadd8_vs_r9_r10_r13, }, { ARRAY_SIZE(kInstruction_uadd8_vc_r11_r14_r12), kInstruction_uadd8_vc_r11_r14_r12, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r14_r8_r7), kInstruction_uadd8_ge_r14_r8_r7, }, { ARRAY_SIZE(kInstruction_uadd8_lt_r13_r0_r11), kInstruction_uadd8_lt_r13_r0_r11, }, { ARRAY_SIZE(kInstruction_uadd8_lt_r14_r13_r4), kInstruction_uadd8_lt_r14_r13_r4, }, { ARRAY_SIZE(kInstruction_uadd8_al_r1_r10_r9), kInstruction_uadd8_al_r1_r10_r9, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r11_r14_r11), kInstruction_uadd8_ge_r11_r14_r11, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r11_r4_r11), kInstruction_uadd8_cs_r11_r4_r11, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r0_r14_r7), kInstruction_uadd8_ge_r0_r14_r7, }, { ARRAY_SIZE(kInstruction_uadd8_mi_r1_r2_r9), kInstruction_uadd8_mi_r1_r2_r9, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r5_r12_r3), kInstruction_uadd8_eq_r5_r12_r3, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r1_r5_r12), kInstruction_uadd8_ge_r1_r5_r12, }, { ARRAY_SIZE(kInstruction_uadd8_lt_r10_r11_r4), kInstruction_uadd8_lt_r10_r11_r4, }, { ARRAY_SIZE(kInstruction_uadd8_le_r1_r1_r5), kInstruction_uadd8_le_r1_r1_r5, }, { ARRAY_SIZE(kInstruction_uadd8_al_r9_r1_r8), kInstruction_uadd8_al_r9_r1_r8, }, { ARRAY_SIZE(kInstruction_uadd8_ne_r6_r8_r4), kInstruction_uadd8_ne_r6_r8_r4, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r12_r2_r9), kInstruction_uadd8_ge_r12_r2_r9, }, { ARRAY_SIZE(kInstruction_uadd8_pl_r4_r3_r10), kInstruction_uadd8_pl_r4_r3_r10, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r14_r4_r11), kInstruction_uadd8_eq_r14_r4_r11, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r9_r7_r6), kInstruction_uadd8_cc_r9_r7_r6, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r12_r4_r5), kInstruction_uadd8_ge_r12_r4_r5, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r2_r3_r4), kInstruction_uadd8_hi_r2_r3_r4, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r0_r3_r1), kInstruction_uadd8_cs_r0_r3_r1, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r6_r2_r8), kInstruction_uadd8_hi_r6_r2_r8, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r3_r14_r13), kInstruction_uadd8_cc_r3_r14_r13, }, { ARRAY_SIZE(kInstruction_uadd8_gt_r11_r4_r7), kInstruction_uadd8_gt_r11_r4_r7, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r5_r0_r12), kInstruction_uadd8_hi_r5_r0_r12, }, { ARRAY_SIZE(kInstruction_uadd8_gt_r0_r14_r14), kInstruction_uadd8_gt_r0_r14_r14, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r9_r0_r10), kInstruction_uadd8_hi_r9_r0_r10, }, { ARRAY_SIZE(kInstruction_uadd8_vc_r7_r11_r8), kInstruction_uadd8_vc_r7_r11_r8, }, { ARRAY_SIZE(kInstruction_uadd8_pl_r11_r9_r6), kInstruction_uadd8_pl_r11_r9_r6, }, { ARRAY_SIZE(kInstruction_uadd8_al_r3_r3_r7), kInstruction_uadd8_al_r3_r3_r7, }, { ARRAY_SIZE(kInstruction_uadd8_mi_r5_r7_r9), kInstruction_uadd8_mi_r5_r7_r9, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r11_r2_r4), kInstruction_uadd8_cc_r11_r2_r4, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r9_r13_r10), kInstruction_uadd8_cc_r9_r13_r10, }, { ARRAY_SIZE(kInstruction_uadd8_al_r5_r2_r6), kInstruction_uadd8_al_r5_r2_r6, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r9_r4_r6), kInstruction_uadd8_ge_r9_r4_r6, }, { ARRAY_SIZE(kInstruction_uadd8_ls_r3_r3_r4), kInstruction_uadd8_ls_r3_r3_r4, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r14_r1_r8), kInstruction_uadd8_ge_r14_r1_r8, }, { ARRAY_SIZE(kInstruction_uadd8_ls_r7_r12_r7), kInstruction_uadd8_ls_r7_r12_r7, }, { ARRAY_SIZE(kInstruction_uadd8_al_r11_r10_r5), kInstruction_uadd8_al_r11_r10_r5, }, { ARRAY_SIZE(kInstruction_uadd8_al_r7_r4_r6), kInstruction_uadd8_al_r7_r4_r6, }, { ARRAY_SIZE(kInstruction_uadd8_vs_r12_r4_r10), kInstruction_uadd8_vs_r12_r4_r10, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r4_r4_r4), kInstruction_uadd8_eq_r4_r4_r4, }, { ARRAY_SIZE(kInstruction_uadd8_vs_r6_r6_r12), kInstruction_uadd8_vs_r6_r6_r12, }, { ARRAY_SIZE(kInstruction_uadd8_pl_r9_r3_r5), kInstruction_uadd8_pl_r9_r3_r5, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r6_r5_r13), kInstruction_uadd8_eq_r6_r5_r13, }, { ARRAY_SIZE(kInstruction_uadd8_cc_r8_r2_r12), kInstruction_uadd8_cc_r8_r2_r12, }, { ARRAY_SIZE(kInstruction_uadd8_le_r4_r2_r0), kInstruction_uadd8_le_r4_r2_r0, }, { ARRAY_SIZE(kInstruction_uadd8_lt_r7_r9_r8), kInstruction_uadd8_lt_r7_r9_r8, }, { ARRAY_SIZE(kInstruction_uadd8_le_r4_r7_r11), kInstruction_uadd8_le_r4_r7_r11, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r5_r7_r5), kInstruction_uadd8_eq_r5_r7_r5, }, { ARRAY_SIZE(kInstruction_uadd8_vc_r10_r7_r12), kInstruction_uadd8_vc_r10_r7_r12, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r7_r10_r6), kInstruction_uadd8_eq_r7_r10_r6, }, { ARRAY_SIZE(kInstruction_uadd8_pl_r1_r12_r2), kInstruction_uadd8_pl_r1_r12_r2, }, { ARRAY_SIZE(kInstruction_uadd8_le_r14_r6_r6), kInstruction_uadd8_le_r14_r6_r6, }, { ARRAY_SIZE(kInstruction_uadd8_ne_r3_r8_r8), kInstruction_uadd8_ne_r3_r8_r8, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r4_r12_r8), kInstruction_uadd8_eq_r4_r12_r8, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r11_r2_r3), kInstruction_uadd8_ge_r11_r2_r3, }, { ARRAY_SIZE(kInstruction_uadd8_hi_r12_r6_r11), kInstruction_uadd8_hi_r12_r6_r11, }, { ARRAY_SIZE(kInstruction_uadd8_cs_r4_r5_r10), kInstruction_uadd8_cs_r4_r5_r10, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r10_r2_r10), kInstruction_uadd8_ge_r10_r2_r10, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r5_r14_r6), kInstruction_uadd8_ge_r5_r14_r6, }, { ARRAY_SIZE(kInstruction_uadd8_gt_r13_r7_r5), kInstruction_uadd8_gt_r13_r7_r5, }, { ARRAY_SIZE(kInstruction_uadd8_ge_r13_r4_r12), kInstruction_uadd8_ge_r13_r4_r12, }, { ARRAY_SIZE(kInstruction_uadd8_lt_r8_r10_r14), kInstruction_uadd8_lt_r8_r10_r14, }, { ARRAY_SIZE(kInstruction_uadd8_le_r4_r3_r13), kInstruction_uadd8_le_r4_r3_r13, }, { ARRAY_SIZE(kInstruction_uadd8_pl_r0_r9_r0), kInstruction_uadd8_pl_r0_r9_r0, }, { ARRAY_SIZE(kInstruction_uadd8_eq_r2_r3_r1), kInstruction_uadd8_eq_r2_r3_r1, }, { ARRAY_SIZE(kInstruction_uadd8_vc_r0_r0_r3), kInstruction_uadd8_vc_r0_r0_r3, }, { ARRAY_SIZE(kInstruction_uadd8_mi_r10_r8_r11), kInstruction_uadd8_mi_r10_r8_r11, }, { ARRAY_SIZE(kInstruction_uadd8_mi_r5_r14_r14), kInstruction_uadd8_mi_r5_r14_r14, }, { ARRAY_SIZE(kInstruction_uadd8_gt_r5_r11_r2), kInstruction_uadd8_gt_r5_r11_r2, }, { ARRAY_SIZE(kInstruction_uadd8_al_r4_r7_r11), kInstruction_uadd8_al_r4_r7_r11, }, }; #endif // VIXL_ASSEMBLER_COND_RD_RN_RM_UADD8_A32_H_
c
okl4_kernel/okl4_2.1.1-patch.9/l4test/src/platformcontrol.c
CyberQueenMara/baseband-research
77
1390033
/* * Copyright (c) 2007 Open Kernel Labs, Inc. (Copyright Holder). * All rights reserved. * * 1. Redistribution and use of OKL4 (Software) in source and binary * forms, with or without modification, are permitted provided that the * following conditions are met: * * (a) Redistributions of source code must retain this clause 1 * (including paragraphs (a), (b) and (c)), clause 2 and clause 3 * (Licence Terms) and the above copyright notice. * * (b) Redistributions in binary form must reproduce the above * copyright notice and the Licence Terms in the documentation and/or * other materials provided with the distribution. * * (c) Redistributions in any form must be accompanied by information on * how to obtain complete source code for: * (i) the Software; and * (ii) all accompanying software that uses (or is intended to * use) the Software whether directly or indirectly. Such source * code must: * (iii) either be included in the distribution or be available * for no more than the cost of distribution plus a nominal fee; * and * (iv) be licensed by each relevant holder of copyright under * either the Licence Terms (with an appropriate copyright notice) * or the terms of a licence which is approved by the Open Source * Initative. For an executable file, "complete source code" * means the source code for all modules it contains and includes * associated build and other files reasonably required to produce * the executable. * * 2. THIS SOFTWARE IS PROVIDED ``AS IS'' AND, TO THE EXTENT PERMITTED BY * LAW, ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR * PURPOSE, OR NON-INFRINGEMENT, ARE DISCLAIMED. WHERE ANY WARRANTY IS * IMPLIED AND IS PREVENTED BY LAW FROM BEING DISCLAIMED THEN TO THE * EXTENT PERMISSIBLE BY LAW: (A) THE WARRANTY IS READ DOWN IN FAVOUR OF * THE COPYRIGHT HOLDER (AND, IN THE CASE OF A PARTICIPANT, THAT * PARTICIPANT) AND (B) ANY LIMITATIONS PERMITTED BY LAW (INCLUDING AS TO * THE EXTENT OF THE WARRANTY AND THE REMEDIES AVAILABLE IN THE EVENT OF * BREACH) ARE DEEMED PART OF THIS LICENCE IN A FORM MOST FAVOURABLE TO * THE COPYRIGHT HOLDER (AND, IN THE CASE OF A PARTICIPANT, THAT * PARTICIPANT). IN THE LICENCE TERMS, "PARTICIPANT" INCLUDES EVERY * PERSON WHO HAS CONTRIBUTED TO THE SOFTWARE OR WHO HAS BEEN INVOLVED IN * THE DISTRIBUTION OR DISSEMINATION OF THE SOFTWARE. * * 3. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ANY OTHER PARTICIPANT BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <l4test/l4test.h> #include <l4test/utility.h> #include <stddef.h> #include <l4/ipc.h> #include <l4/thread.h> #include <l4/schedule.h> #include <l4/misc.h> #include <l4/security.h> #include <stdio.h> #include <stdlib.h> #include <assert.h> /* \begin{test}{PLAT0100} \TestDescription{Check platform control not implemented} \TestPostConditions{} \TestImplementationProcess{ \begin{enumerate} \item Call \Func{L4\_PlatformControl} \item Check that the return value is 0 \item Check that the error code in \Func{ENOT\_IMPLEMENTED} \end{enumerate} } \TestImplementationStatus{Implemented} \TestIsFullyAutomated{Yes} \TestRegressionStatus{In regression test suite} \end{test} */ static void test_thread(void) { L4_ThreadId_t from = L4_nilthread; L4_Msg_t msg; L4_MsgTag_t tag; L4_Word_t result; /* Wait for msg */ tag = L4_Wait(&from); _fail_unless (L4_IpcSucceeded (tag), __FILE__, __LINE__, "Could not get message. Error: %ld", (int) L4_ErrorCode ()); result = L4_PlatformControl(0, 0, 0, 0); L4_MsgClear (&msg); L4_MsgAppendWord(&msg, (result != 0) ? -1 : L4_ErrorCode ()); L4_MsgLoad (&msg); tag = L4_Call(from); _fail_unless (L4_IpcSucceeded (tag), __FILE__, __LINE__, "Could not send message. Error: %ld", (int) L4_ErrorCode ()); } START_TEST(PLAT0100) { L4_Msg_t msg; L4_MsgTag_t tag; L4_SpaceId_t space; L4_ThreadId_t thread; L4_Word_t result = -10; space = createSpace(); thread = createThreadInSpace(space, test_thread); L4_AllowPlatformControl(space); L4_MsgClear (&msg); L4_Set_MsgLabel (&msg, 0x1); L4_MsgLoad (&msg); tag = L4_Call (thread); _fail_unless (L4_IpcSucceeded (tag), __FILE__, __LINE__, "Could not send message to thread. Error: %ld", (int) L4_ErrorCode ()); L4_StoreMR(1, &result); /* check for NOT_IMPLEMENTED */ _fail_unless (result == 16, __FILE__, __LINE__, "Wrong error code: %ld", (int) result ); deleteThread(thread); deleteSpace(space); } END_TEST /* \begin{test}{PLAT0200} \TestDescription{Check platform control privilege} \TestPostConditions{} \TestImplementationProcess{ \begin{enumerate} \item Call \Func{L4\_PlatformControl} from a deprivileged thread \item Check that the return value is 0 \item Check that the error code in \Func{ENO\_PRIVILEGE} \end{enumerate} } \TestImplementationStatus{Implemented} \TestIsFullyAutomated{Yes} \TestRegressionStatus{In regression test suite} \end{test} */ START_TEST(PLAT0200) { L4_Msg_t msg; L4_MsgTag_t tag; L4_SpaceId_t space; L4_ThreadId_t thread; L4_Word_t result = -10; space = createSpace(); thread = createThreadInSpace(space, test_thread); L4_MsgClear (&msg); L4_Set_MsgLabel (&msg, 0x1); L4_MsgLoad (&msg); tag = L4_Call (thread); _fail_unless (L4_IpcSucceeded (tag), __FILE__, __LINE__, "Could not send message to thread. Error: %ld", (int) L4_ErrorCode ()); L4_StoreMR(1, &result); /* check for NO_PRIVILEGE */ _fail_unless (result == 1, __FILE__, __LINE__, "Wrong error code: %ld", (int) result ); deleteThread(thread); deleteSpace(space); } END_TEST static void test_setup(void) { initThreads(0); } static void test_teardown(void) { } TCase * make_platform_control_tcase(void) { TCase *tc; initThreads(0); tc = tcase_create("Platform Control Tests"); tcase_add_checked_fixture(tc, test_setup, test_teardown); tcase_add_test(tc, PLAT0100); tcase_add_test(tc, PLAT0200); return tc; }
c
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
32