Skip to content

Commit

Permalink
support on gcc shipped with Mac M1
Browse files Browse the repository at this point in the history
  • Loading branch information
5HT committed Apr 2, 2024
1 parent 108e3a8 commit 0a7cf10
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions arch/arm/armadillo.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ struct ad_insn *insn = NULL;
char *decodeARM(unsigned long int start, char *outbuf, int *lendis, unsigned long int offset0)
{
*lendis = 4;
opcode = start;
ArmadilloDisassemble(*opcode, opcode, &insn);
opcode = (unsigned int *)start;
ArmadilloDisassemble(*opcode, (unsigned long)opcode, &insn);
memcpy(outbuf,insn->decoded,strlen(insn->decoded)+1);
ArmadilloDone(&insn);
return outbuf;
Expand Down
2 changes: 1 addition & 1 deletion dasm/dasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void disassemble_screen(struct editor* e, struct charbuf* b)
q = &e->contents[offset];
for (int i = 0; i < e->screen_rows - 2; i++) if (offset < e->content_length)
{
decode(q, outbuf, &lendis, offset);
decode((unsigned long)q, outbuf, &lendis, offset);
setup_instruction(i, e, b, offset, (uint8_t *) q, lendis, outbuf);
q += lendis;
offset += lendis;
Expand Down

0 comments on commit 0a7cf10

Please sign in to comment.