Skip to content

Commit

Permalink
threads started
Browse files Browse the repository at this point in the history
  • Loading branch information
geohot committed Apr 14, 2009
1 parent bac8351 commit b2b6bc1
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
25 changes: 24 additions & 1 deletion Controller/ARM/InstructionARM.cc
Expand Up @@ -228,7 +228,30 @@ bool InstructionARM::initBranches()

bool InstructionARM::initMiscellaneous()
{
return false;
//i don't know what these do
templateInstructionARM *i=(templateInstructionARM *)&mOpcode;
//********************Instruction********************
mString.add("M",DT_OPCODE);
mString.add((i->mi.L)?"SR":"RS",DT_FLAG);
mString << conditionsARM(i->generic.cond) << " ";
//********************Data********************
// **First**
if(!(i->mi.L))
{
mString << registersARM(i->generic.Rd) << ", ";
}
// **Second**
mString << registersARM(16+i->mi.R);
if(i->mi.L)
{
mString.add("_",DT_SYMBOL);
if(i->mi.mb_c) mString.add("c",DT_SYMBOL);
if(i->mi.mb_x) mString.add("x",DT_SYMBOL);
if(i->mi.mb_s) mString.add("s",DT_SYMBOL);
if(i->mi.mb_f) mString.add("f",DT_SYMBOL);
}

return true;
}

int InstructionARM::getEncodingARM(Data opcode)
Expand Down
16 changes: 16 additions & 0 deletions include/macros.h
Expand Up @@ -21,4 +21,20 @@
#define rol(x,n) (x<<n | (x>>(32-n)))
#define ror(x,n) (x>>n | (x<<(32-n)))

//it's the geohot magic thread macros
//threadCreate(&threadContainer, function)
#ifdef __MINGW32__ || __CYGWIN__
#include <Windows.h>
#define WIN32_LEAN_AND_MEAN

#define threadContainer HANDLE
#define threadCreate(y,x) (*y)=CreateThread(0,0,x,0,0);
#define threadDestroy
#else
#include <pthread.h>

#define threadContainer pthread_t

#endif

#endif /* EDA_EDAMACROS_H_ */

0 comments on commit b2b6bc1

Please sign in to comment.