mirror of
https://github.com/mist-devel/mist-board.git
synced 2026-04-28 13:08:14 +00:00
52 lines
2.2 KiB
C++
52 lines
2.2 KiB
C++
/* fuzz.h
|
|
|
|
Copyright (c) 2015, Stephen J. Leary
|
|
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 the <organization> 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 AND 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 <COPYRIGHT HOLDER> 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.
|
|
*/
|
|
#ifndef _FUZZ_H_
|
|
#define _FUZZ_H_
|
|
|
|
|
|
#include <string>
|
|
#include <iostream>
|
|
#include <iomanip>
|
|
|
|
#define fhex(_v) std::setw(_v) << std::hex << std::setfill('0')
|
|
|
|
|
|
#define NOP 0xe1a00000
|
|
#define TERMSWI 0xefffffff
|
|
|
|
static const char *const reg_names[] = {"r0","r1","r2","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12","r13","r14","r15",
|
|
"r8_firq","r9_firq","r10_firq","r11_firq","r12_firq","r13_firq","r14_firq",
|
|
"r13_irq","r14_irq","r13_svc","r14_svc"};
|
|
|
|
static const char *const aluop[] = {
|
|
"and", "eor", "sub", "rsb", "add", "adc", "sbc", "rsc",
|
|
"tst", "teq", "cmp", "cmn", "orr", "mov", "bic", "mvn"
|
|
};
|
|
|
|
#endif
|