* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "arm_disassembler.h"
#include "log.h"
-#include <strings.h>
+#include <string.h>
/* textual represenation of the condition field */
/* ALways (default) is ommitted (empty string) */
/* Multiply (accumulate) long */
if ((opcode & 0x0f800000) == 0x00800000)
{
- char* mnemonic;
+ char* mnemonic = NULL;
u8 Rm, Rs, RdHi, RdLow, S;
Rm = opcode & 0xf;
Rs = (opcode & 0xf00) >> 8;
if ((opcode & 0x0000000f0) == 0x00000050)
{
u8 Rm, Rd, Rn;
- char *mnemonic;
+ char *mnemonic = NULL;
Rm = opcode & 0xf;
Rd = (opcode & 0xf000) >> 12;
Rn = (opcode & 0xf0000) >> 16;
int evaluate_data_proc(u32 opcode, u32 address, arm_instruction_t *instruction)
{
u8 I, op, S, Rn, Rd;
- char *mnemonic;
+ char *mnemonic = NULL;
char shifter_operand[32];
I = (opcode & 0x02000000) >> 25;
int evaluate_opcode(u32 opcode, u32 address, arm_instruction_t *instruction)
{
/* clear fields, to avoid confusion */
- bzero(instruction, sizeof(arm_instruction_t));
+ memset(instruction, 0, sizeof(arm_instruction_t));
instruction->opcode = opcode;
/* catch opcodes with condition field [31:28] = b1111 */
}
/* catch opcodes with [27:25] = b011 */
- if ((opcode & 0x0e000000) == 0x04000000)
+ if ((opcode & 0x0e000000) == 0x06000000)
{
/* Undefined instruction */
if ((opcode & 0x00000010) == 0x00000010)