Exemplo n.º 1
0
void fixclk(FILE * in, int oldclk, int clk)
{
    // fixup amba clock
    int amba = oldclk / 2 * 1000000;
    unsigned int part1 = amba >> 16;
    unsigned int part2 = amba & 0x0000ffff;

    part1 = part1 | 0x3c020000;
    part2 = part2 | 0x34420000;
    int ambadst = clk / 2 * 1000000;
    unsigned int part1dst = ambadst >> 16;
    unsigned int part2dst = ambadst & 0x0000ffff;

    part1dst = part1dst | 0x3c020000;
    part2dst = part2dst | 0x34420000;
    fixup(in, part1, part1dst);
    fixup(in, part2, part2dst);
    // fixup cpu frequency
    /*
     * //not required. code is not compiled into redboot amba = oldclk *
     * 1000000; part1 = amba >> 16; part2 = amba & 0x0000ffff; part1 = part1
     * | 0x3c020000; part2 = part2 | 0x34420000; ambadst = clk * 1000000;
     * part1dst = ambadst >> 16; part2dst = ambadst & 0x0000ffff; part1dst =
     * part1dst | 0x3c020000; part2dst = part2dst | 0x34420000;
     * fixup(in,part1,part1dst); fixup(in,part2,part2dst);
     */
}
Exemplo n.º 2
0
  INLINE void RTCameraPacketGen::generateRay(RayPacket &pckt, int x, int y) const
  {
    const sse3f org(aOrg.xxxx(), aOrg.yyyy(), aOrg.zzzz());
    const ssef left = ssef(ssei(x))+ ssef::identity();
    ssef row = ssef(ssei(y));
    uint32 id = 0;

    // avoid issues with unused w
    pckt.iaMinOrg = pckt.iaMaxOrg = aOrg.xyzz();
    for(uint32 j = 0; j < pckt.height; ++j) {
      ssef column = left;
      for(uint32 i = 0; i < pckt.width; i += ssef::laneNum(), ++id) {
        pckt.org[id]   = org;
        pckt.dir[id].x = fixup(imagePlaneOrg.x + column*xAxis.x + row*zAxis.x);
        pckt.dir[id].y = fixup(imagePlaneOrg.y + column*xAxis.y + row*zAxis.y);
        pckt.dir[id].z = fixup(imagePlaneOrg.z + column*xAxis.z + row*zAxis.z);
        pckt.dir[id].x = (imagePlaneOrg.x + column*xAxis.x + row*zAxis.x);
        pckt.dir[id].y = (imagePlaneOrg.y + column*xAxis.y + row*zAxis.y);
        pckt.dir[id].z = (imagePlaneOrg.z + column*xAxis.z + row*zAxis.z);
        pckt.dir[id] = normalize(pckt.dir[id]);
        pckt.rdir[id].x = rcp(pckt.dir[id].x);
        pckt.rdir[id].y = rcp(pckt.dir[id].y);
        pckt.rdir[id].z = rcp(pckt.dir[id].z);
        column += ssef::laneNumv();
      }
      row += ssef::one();
    }
  }
Exemplo n.º 3
0
/* Handle dot labels */
OUTPUT *dotLabel(void)
{
	INPUT *in;

	in=READER();
	if(!in) return NULL;

	switch(in->type) {
	case IS_LABEL:
		switch(in->data.label.text[0]) {
		case '.':
			fixup(in->data.label.text,0);
			break;
		case '_': /* Ignore underscore labels */
			break;
		default:	/* This is a full label */
			fixup(in->data.label.text,0);
			strcpy(fullLabel,in->data.label.text);
			break;
		}
		break;
	case IS_INSTR:
		if(in->data.instr.opsMode==O_SPECIAL)
			break;
		/* Search for label usage */
		/* Operand 1 */
		fixup(in->data.instr.op1.constant.text,in->data.instr.op1.mode==OP_MACRO);
		/* Operand 2 */
		fixup(in->data.instr.op2.constant.text,in->data.instr.op2.mode==OP_MACRO);
		break;
	default:
		break;
	}
	return in;
}
Exemplo n.º 4
0
  INLINE void RTCameraPacketGen::generateRayMorton(RayPacket &pckt, int x, int y) const
  {
    const sse3f org(aOrg.xxxx(), aOrg.yyyy(), aOrg.zzzz());
    const ssef left = ssef(ssei(x));
    const ssef top  = ssef(ssei(y));
    uint32 id = 0;

    // avoid issues with unused w
    pckt.iaMinOrg = pckt.iaMaxOrg = aOrg.xyzz();
    for(uint32 j = 0; j < pckt.height; ++j) {
      for(uint32 i = 0; i < pckt.width; i += ssef::laneNum(), ++id) {
        const ssei xcoord = ssei(mortonX + 4 * id);
        const ssei ycoord = ssei(mortonY + 4 * id);
        const ssef column  = left + ssef(xcoord);
        const ssef row = top  + ssef(ycoord);
        pckt.org[id]   = org;
        pckt.dir[id].x = fixup(imagePlaneOrg.x + column*xAxis.x + row*zAxis.x);
        pckt.dir[id].y = fixup(imagePlaneOrg.y + column*xAxis.y + row*zAxis.y);
        pckt.dir[id].z = fixup(imagePlaneOrg.z + column*xAxis.z + row*zAxis.z);
        pckt.dir[id] = normalize(pckt.dir[id]);
        pckt.rdir[id].x = rcp(pckt.dir[id].x);
        pckt.rdir[id].y = rcp(pckt.dir[id].y);
        pckt.rdir[id].z = rcp(pckt.dir[id].z);
      }
    }
  }
Exemplo n.º 5
0
Arquivo: abi.cpp Projeto: smunix/ldc
    void rewriteFunctionType(TypeFunction* tf)
    {
        assert(tf->linkage == LINKintrinsic);

        IrFuncTy& fty = tf->fty;

        if (!fty.arg_sret) {
            Type* rt = fty.ret->type->toBasetype();
            if (rt->ty == Tstruct)  {
                Logger::println("Intrinsic ABI: Transforming return type");
                fixup(*fty.ret);
            }
        }

        Logger::println("Intrinsic ABI: Transforming arguments");
        LOG_SCOPE;

        for (IrFuncTy::ArgIter I = fty.args.begin(), E = fty.args.end(); I != E; ++I) {
            IrFuncTyArg& arg = **I;

            if (Logger::enabled())
                Logger::cout() << "Arg: " << arg.type->toChars() << '\n';

            // Arguments that are in memory are of no interest to us.
            if (arg.byref)
                continue;

            Type* ty = arg.type->toBasetype();
            if (ty->ty == Tstruct)
                fixup(arg);

            if (Logger::enabled())
                Logger::cout() << "New arg type: " << *arg.ltype << '\n';
        }
    }
Exemplo n.º 6
0
static void ILXUpdateGamepad(){
	JOYINFOEX t;
	PAD j;

	memset(&t,0,sizeof(t));
	memset(&j,0,sizeof(j));
	t.dwSize=sizeof(JOYINFOEX);
	t.dwFlags=JOY_RETURNALL;

	if(JOYERR_NOERROR==joyGetPosEx(JOYSTICKID1,&t)){
		j.size = sizeof(j);

		j.LStick.x = (t.dwXpos - 32767.0f)/32767.0f;
		j.LStick.y = (t.dwYpos - 32767.0f)/32767.0f;
		j.RStick.x = (t.dwRpos - 32767.0f)/32767.0f;
		j.RStick.y = (t.dwZpos - 32767.0f)/32767.0f;

		j.buttons = t.dwButtons;

		#define fixup(what) if(what> -0.2f && what<0.2f)what=0;  else if(what<-1.0f)what= -1.0f; else if(what>1.0f)what= 1.0f;
		fixup(j.LStick.x);
		fixup(j.LStick.y);
		fixup(j.RStick.x);
		fixup(j.RStick.y);
		#undef fixup

		if(t.dwPOV==27000)j.buttons |= 1 << LEFT;
		if(t.dwPOV==9000 )j.buttons |= 1 << RIGHT;
		if(t.dwPOV==0    )j.buttons |= 1 << UP;
		if(t.dwPOV==18000)j.buttons |= 1 << DOWN;
	}

#if 0
	for(int i=0;i<16;i++){
		U8 b1,b2,b3;
		b1 = ILXPad1.buttons[i];
		b2 = j.buttons[i];
		b3 = ILXPad1.repeat[i];
		if(b1 && b2){
			if(b3<255)b3++;
			j.repeat[i]=b3;
		}
		j.newbuttons[i] = (b1^b2)&b2;
		j.buttons[i]=b2;
	}
#endif

	memcpy(&ILXPad1,&j,sizeof(j));
}
Exemplo n.º 7
0
HRESULT CeeFileGenWriter::generateImage(void **ppImage)
{
    HRESULT hr;

    if (!m_fixed)
        IfFailRet(fixup());

    LPWSTR outputFileName = m_outputFileName;

    if (! outputFileName && ppImage == NULL) {
        if (m_comImageFlags & COMIMAGE_FLAGS_IL_LIBRARY)
            outputFileName = L"output.ill";
        else if (m_dllSwitch)
            outputFileName = L"output.dll";
        else if (m_objSwitch)
            outputFileName = L"output.obj";
        else
            outputFileName = L"output.exe";
    }

    // output file name and ppImage are mutually exclusive
    _ASSERTE((NULL == outputFileName && ppImage != NULL) || (outputFileName != NULL && NULL == ppImage));

    if (outputFileName != NULL)
        IfFailRet(getPEWriter().write(outputFileName));
    else
        IfFailRet(getPEWriter().write(ppImage));

    return S_OK;
} // HRESULT CeeFileGenWriter::generateImage()
void insert(struct Tree * T, struct node * temp)
{
	struct node * z = temp;
	struct node * y = T->nil;
	struct node * x = T->root;

	while(x != T->nil)
	{
		y = x;
		if(z->data < x->data)
			x = x->lchild;
		else
			x = x->rchild;
	}

	z->parent = y;

	if(y == T->nil)
		T->root = z;
	else if(z->data < y->data)
		y->lchild = z;
	else
		y->rchild = z;

	z->lchild = T->nil;
	z->rchild = T->nil;
	z->color = RED;

	fixup(T,z);
}
Exemplo n.º 9
0
Arquivo: mu-str.c Projeto: ardumont/mu
gchar*
mu_str_xapian_fixup_terms (const gchar *term)
{
	gboolean is_field, is_range_field;
	const gchar *cond, *pfx, *sfx;
	gchar *retval;
	fixup_handler_t fixup;

	g_return_val_if_fail (term, NULL);

	if (strlen (term) == 0)
		return g_strdup (term);

	check_for_field (term, &is_field, &is_range_field);
	if (!is_field || !is_range_field)
		return g_strdup (term);

	if (!split_term (term, &pfx, &cond, &sfx))
		return g_strdup (term);

	retval = NULL;
	fixup = find_fixup (cond);
	if (fixup)
		retval = fixup (pfx, cond, sfx);
	if (!retval)
		retval = g_strdup (term);

	/* At this point retval should contain the result */
	g_free ((gchar *)pfx);
	g_free ((gchar *)sfx);
	g_free ((gchar *)cond);

	return retval;
}
Exemplo n.º 10
0
void factor_vm::fixup_data(cell data_offset, cell code_offset) {
  startup_fixup fixup(data_offset, code_offset);
  slot_visitor<startup_fixup> visitor(this, fixup);
  visitor.visit_all_roots();

  auto start_object_updater = [&](object *obj, cell size) {
    data->tenured->starts.record_object_start_offset(obj);
    visitor.visit_slots(obj);
    switch (obj->type()) {
      case ALIEN_TYPE: {

        alien* ptr = (alien*)obj;

        if (to_boolean(ptr->base))
          ptr->update_address();
        else
          ptr->expired = special_objects[OBJ_CANONICAL_TRUE];
        break;
      }
      case DLL_TYPE: {
        ffi_dlopen((dll*)obj);
        break;
      }
      default: {
        visitor.visit_object_code_block(obj);
        break;
      }
    }
  };
  data->tenured->iterate(start_object_updater, fixup);
}
Exemplo n.º 11
0
SLFUTURE_VOID *SLdebug_realloc (SLFUTURE_VOID *p, unsigned long n)
{
   if (-1 == check_memory ((unsigned char *) p, "REALLOC")) return NULL;
   if ((p = (char *) SLREALLOC ((char*)p - Chunk, n + 2 * Chunk)) == NULL) return NULL;
   fixup ((unsigned char *) p, n, "REALLOC");
   return (SLFUTURE_VOID *) ((char*)p + Chunk);
}
Exemplo n.º 12
0
/* Compact just the code heap, after growing the data heap */
void factor_vm::collect_compact_code_impl(bool trace_contexts_p)
{
	/* Figure out where blocks are going to go */
	mark_bits<code_block> *code_forwarding_map = &code->allocator->state;
	code_forwarding_map->compute_forwarding();

	const code_block *code_finger = code->allocator->first_block();

	code_compaction_fixup fixup(code_forwarding_map,&code_finger);
	slot_visitor<code_compaction_fixup> data_forwarder(this,fixup);
	code_block_visitor<code_compaction_fixup> code_forwarder(this,fixup);

	code_forwarder.visit_uninitialized_code_blocks();

	if(trace_contexts_p)
		code_forwarder.visit_context_code_blocks();

	/* Update code heap references in data heap */
	object_grow_heap_updater object_updater(code_forwarder);
	each_object(object_updater);

	/* Slide everything in the code heap up, and update code heap
	pointers inside code blocks. */
	code_block_compaction_updater<code_compaction_fixup> code_block_updater(this,fixup,data_forwarder,code_forwarder);
	code->allocator->compact(code_block_updater,fixup,&code_finger);

	update_code_roots_for_compaction();
	callbacks->update();
}
Exemplo n.º 13
0
unsigned int
__canonicalize_funcptr_for_compare (fptr_t fptr)
{
  static unsigned int fixup_plabel[2] __attribute__((used));
  fixup_t fixup;
  unsigned int *got, *iptr, *plabel;
  int i;

  /* -1 and page 0 are special.  -1 is used in crtend to mark the end of
     a list of function pointers.  Also return immediately if the plabel
     bit is not set in the function pointer.  In this case, the function
     pointer points directly to the function.  */
  if ((int) fptr == -1 || (unsigned int) fptr < 4096 || !((int) fptr & 2))
    return (unsigned int) fptr;

  /* The function pointer points to a function descriptor (plabel).  If
     the plabel hasn't been resolved, the first word of the plabel points
     to the entry of the PLT stub just before the global offset table.
     The second word in the plabel contains the relocation offset for the
     function.  */
  plabel = (unsigned int *) ((unsigned int) fptr & ~3);
  got = (unsigned int *) (plabel[0] + GOT_FROM_PLT_STUB);

  /* Return the address of the function if the plabel has been resolved.  */
  if (got !=  &_GLOBAL_OFFSET_TABLE_)
    return plabel[0];

  /* Find the first "bl" branch in the offset search list.  This is a
     call to _dl_fixup or a magic branch to fixup at the beginning of the
     trampoline template.  The fixup function does the actual runtime
     resolution of function descriptors.  We only look for "bl" branches
     with a 17-bit pc-relative displacement.  */
  for (i = 0; i < NOFFSETS; i++)
    {
      iptr = (unsigned int *) (got[-2] + fixup_branch_offset[i]);
      if ((*iptr & 0xfc00e000) == 0xe8000000)
	break;
    }

  /* This should not happen... */
  if (i == NOFFSETS)
    return ~0;

  /* Extract the 17-bit displacement from the instruction.  */
  iptr += SIGN_EXTEND (GET_FIELD (*iptr, 19, 28) |
		       GET_FIELD (*iptr, 29, 29) << 10 |
		       GET_FIELD (*iptr, 11, 15) << 11 |
		       GET_FIELD (*iptr, 31, 31) << 16, 17);

  /* Build a plabel for an indirect call to _dl_fixup.  */
  fixup_plabel[0] = (unsigned int) iptr + 8;	/* address of fixup */
  fixup_plabel[1] = got[-1];			/* ltp for fixup */
  fixup = (fixup_t) ((int) fixup_plabel | 3);

  /* Call fixup to resolve the function address.  got[1] contains the
     link_map pointer and plabel[1] the relocation offset.  */
  fixup ((struct link_map *) got[1], plabel[1]);

  return plabel[0];
}
Exemplo n.º 14
0
global
void obfix(OBJECT *tree, int object)
{
	OBJECT *o = tree + object;

	o->r.x = fixup(o->r.x, screen.c_max_w) ;
	o->r.y = fixup(o->r.y, screen.c_max_h) ;
	/*
	 * Special case handling: any OBJECT 80 characters wide is supposed
	 * to be a menu bar, which always covers the entire screen width...
	 */
	o->r.w = (o->r.w == 80)
				? screen.r.w
				: fixup(o->r.w, screen.c_max_w) ;
	o->r.h = fixup(o->r.h, screen.c_max_h) ;
}
Exemplo n.º 15
0
static void undo(void)
{
	uint8_t op;
	uint8_t dir;
	uint8_t c;
	int8_t *dp;
	uint8_t pry, prx;

	if (undop == 0)
		return;
	op = undolist[--undop];
	dir = op & 0x7F;
	/* As we are reversing a move we know we won't be pushing any other
	   block */
	if (op & BLOCK_MOVED) {
		/* We need to reverse a block */
		if (map.map[map.py][map.px] == MAP_TARGET)
			map.done++;
		map.map[map.py][map.px] = MAP_BLOCK;
		/* The block after the one in direction goes back to previous
		   (we don't allow a multi-block push) */
		dp = delta[dir];
		pry = map.py + *dp;
		prx = map.px + *++dp;
		c = fixup(base_map.map[pry][prx]);
		map.map[pry][prx] = c;
		draw(pry, prx, c);
		if (c == MAP_TARGET)
			map.done--;
	}
	move(reverse[dir] - 'H');
}
Exemplo n.º 16
0
void QDateEdit_QtDShell::__override_fixup(QString&  input0, bool static_call) const
{
    if (static_call) {
        QDateTimeEdit::fixup((QString& )input0);
    } else {
        fixup((QString& )input0);
    }
}
Exemplo n.º 17
0
void QRegExpValidator_QtDShell::__override_fixup(QString&  arg__1, bool static_call) const
{
    if (static_call) {
        QValidator::fixup((QString& )arg__1);
    } else {
        fixup((QString& )arg__1);
    }
}
Exemplo n.º 18
0
SLFUTURE_VOID *SLdebug_malloc (unsigned long n)
{
   char *p;

   if ((p = (char *) SLMALLOC (n + 2 * Chunk)) == NULL) return NULL;

   fixup ((unsigned char *) p, n, "MALLOC");
   return (SLFUTURE_VOID *)(p + Chunk);
}
bool DateWidget::eventFilter(QObject *watched, QEvent *event)
{
    if (watched == m_lineEdit && event->type() == QEvent::FocusOut) {
        fixup();
        emit editingFinished();
    }

    return false;
}
void DateWidget::setRange(int minimum, int maximum)
{
    m_minimum = minimum;
    m_maximum = maximum;

    QIntValidator *validator = new QIntValidator(m_minimum, m_maximum, this);
    m_lineEdit->setValidator(validator);

    fixup();
}
Exemplo n.º 21
0
void factor_vm::fixup_code(cell data_offset, cell code_offset) {
  startup_fixup fixup(data_offset, code_offset);
  auto updater = [&](code_block* compiled, cell size) {
    slot_visitor<startup_fixup> visitor(this, fixup);
    visitor.visit_code_block_objects(compiled);
    cell rel_base = compiled->entry_point() - fixup.code_offset;
    visitor.visit_instruction_operands(compiled, rel_base);
  };
  code->allocator->iterate(updater, fixup);
}
Exemplo n.º 22
0
void WEXPORT WString::truncate( int count )
{
    if( _value != NULL ) {
        int len = strlen( _value );
        if( count < len ) {
            _value[ count ] = '\0';
        }
        fixup();
    }
}
Exemplo n.º 23
0
/* Compact data and code heaps */
void factor_vm::collect_compact_impl(bool trace_contexts_p)
{
	gc_event *event = current_gc->event;

#if defined(FACTOR_DEBUG)
	code->verify_all_blocks_set();
#endif

	if(event) event->started_compaction();

	tenured_space *tenured = data->tenured;
	mark_bits<object> *data_forwarding_map = &tenured->state;
	mark_bits<code_block> *code_forwarding_map = &code->allocator->state;

	/* Figure out where blocks are going to go */
	data_forwarding_map->compute_forwarding();
	code_forwarding_map->compute_forwarding();

	const object *data_finger = tenured->first_block();
	const code_block *code_finger = code->allocator->first_block();

	compaction_fixup fixup(data_forwarding_map,code_forwarding_map,&data_finger,&code_finger);
	slot_visitor<compaction_fixup> data_forwarder(this,fixup);
	code_block_visitor<compaction_fixup> code_forwarder(this,fixup);

	code_forwarder.visit_code_roots();

	/* Object start offsets get recomputed by the object_compaction_updater */
	data->tenured->starts.clear_object_start_offsets();

	/* Slide everything in tenured space up, and update data and code heap
	pointers inside objects. */
	object_compaction_updater object_updater(this,fixup);
	tenured->compact(object_updater,fixup,&data_finger);

	/* Slide everything in the code heap up, and update data and code heap
	pointers inside code blocks. */
	code_block_compaction_updater<compaction_fixup> code_block_updater(this,fixup,data_forwarder,code_forwarder);
	code->allocator->compact(code_block_updater,fixup,&code_finger);

	data_forwarder.visit_roots();
	if(trace_contexts_p)
	{
		data_forwarder.visit_contexts();
		code_forwarder.visit_context_code_blocks();
	}

	update_code_roots_for_compaction();
	callbacks->update();

	code->initialize_all_blocks_set();

	if(event) event->ended_compaction();
}
Exemplo n.º 24
0
void fixlink(int codeAddress) {
    int previousCodeAddress;

    while (codeAddress != 0) {
        previousCodeAddress = getParameterCFromCode(codeAddress);

        fixup(codeAddress);

        codeAddress = previousCodeAddress;
    }
}
Exemplo n.º 25
0
int
main(int argc, char **argv)
{
	int c;

	(void) setlocale(LC_ALL, "");
	while ((c = getopt(argc, argv, "l:o:")) != EOF)
		switch (c) {
		case 'l':
			replin = optarg;
			break;
		case 'o':
			report = optarg;
			break;
		case '?':
			fprintf(stderr, "usage: %s [-l lineuse] "
			    "[-o reboot]\n", argv[0]);
			exit(1);
		}

	if ((tbuf = (struct tbuf *)calloc(a_tsize,
		sizeof (struct tbuf))) == NULL) {
		fprintf(stderr, "acctcon: Cannot allocate memory\n");
		exit(3);
	}

	/*
	 * XXX - fixme - need a good way of getting the fd that getutxent would
	 * use to access wtmpx, so we can convert this read of stdin to use
	 * the APIs and remove the dependence on the existence of the file.
	 */
	while (fread(&wb, sizeof (wb), 1, stdin) == 1) {
		if (firstime == 0)
			firstime = wb.ut_xtime;
		if (valid())
			loop();
		else
			fixup(stderr);
	}
	wb.ut_name[0] = '\0';
	strcpy(wb.ut_line, "acctcon");
	wb.ut_type = ACCOUNTING;
	wb.ut_xtime = lastime;
	loop();

	output();

	if (report != NULL)
		printrep();
	if (replin != NULL)
		printlin();

	exit(exitcode);
}
Exemplo n.º 26
0
/* PlaceStrings - place any string literals defined in the current function */
static void PlaceStrings(ParseContext *c)
{
    String *str;
    for (str = c->strings; str != NULL; str = str->next) {
        if (str->fixups) {
            str->object = StoreBVector(c, str->value, strlen((char *)str->value));
            str->placed = VMTRUE;
            fixup(c, str->fixups, str->object);
            str->fixups = 0;
        }
    }
}
Exemplo n.º 27
0
SLFUTURE_VOID *SLdebug_calloc (unsigned long n, unsigned long size)
{
   char *p;
   unsigned int m;

   /* This is tough -- hope this is a good assumption!! */
   if (size >= Chunk) m = 1; else m = Chunk;

   if ((p = (char *) SLCALLOC (n + m + m, size)) == NULL) return NULL;
   fixup ((unsigned char *) p, size * n, "CALLOC");
   return (SLFUTURE_VOID *)(p + Chunk);
}
Exemplo n.º 28
0
 INLINE bool RTCameraPacketGen::generateIA(RayPacket &pckt, int x, int y) const
 {
   const ssef fw = (float) pckt.width;
   const ssef fh = (float) pckt.height;
   const ssef fx = (float) x;
   const ssef fy = (float) y;
   const ssef bottomLeft = aImagePlaneOrg + fx * axAxis + fy * azAxis;
   const ssef bottomRight = bottomLeft + fw * axAxis;
   const ssef topRight = bottomRight + fh * azAxis;
   const ssef topLeft = bottomLeft + fh * azAxis;
   const ssef dmin = fixup(min(min(bottomLeft, bottomRight), min(topLeft, topRight)));
   const ssef dmax = fixup(max(max(bottomLeft, bottomRight), max(topLeft, topRight)));
   const ssef rcpMin = rcp(dmax).xyzz(); // avoid issues with unused w
   const ssef rcpMax = rcp(dmin).xyzz(); // avoid issues with unused w
   const ssef minusMin = -rcpMin;
   const ssef minusMax = -rcpMax;
   const size_t mask = movemask(rcpMin);
   const sseb maskv = unmovemask(mask);
   pckt.iasign = maskv;
   pckt.iaMinrDir = select(maskv, minusMax, rcpMin);
   pckt.iaMaxrDir = select(maskv, minusMin, rcpMax);
   return movemask(dmin ^ dmax) == 0;
 }
  // call "cleanup" at finished traversing all files.
  void cleanup(void) {
    fixup();

    // "notsave" has higher priority.
    for (const auto& it : identifiers_notsave_) {
      symbol_map_.add("ConfigIndex", it);
    }
    identifiers_notsave_.clear();

    for (const auto& it : identifiers_except_notsave_) {
      symbol_map_.add("ConfigIndex", it);
    }
    identifiers_except_notsave_.clear();
  }
Exemplo n.º 30
0
/*
 * Append the name and priority to strings to be used in vim menu commands.
 */
    void
workshop_submenu_begin(
	char		*label)
{
#ifdef WSDEBUG_TRACE
    if (ws_debug  && ws_dlevel & WS_TRACE
	    && strncmp(curMenuName, "ToolBar", 7) != 0)
	wstrace("workshop_submenu_begin(%s)\n", label);
#endif

    strcat(curMenuName, ".");
    strcat(curMenuName, fixup(label));

    updatePriority(True);
}