Beispiel #1
0
//=============================================================================
HaltNode::HaltNode( Node *ctrl, Node *frameptr ) : Node(TypeFunc::Parms) {
  Node* top = Compile::current()->top();
  init_req(TypeFunc::Control,  ctrl        );
  init_req(TypeFunc::I_O,      top);
  init_req(TypeFunc::Memory,   top);
  init_req(TypeFunc::FramePtr, frameptr    );
  init_req(TypeFunc::ReturnAdr,top);
}
 CMoveNode( Node *bol, Node *left, Node *right, const Type *t ) : TypeNode(t,4)
 {
   init_class_id(Class_CMove);
   // all inputs are nullified in Node::Node(int)
   // init_req(Control,NULL);
   init_req(Condition,bol);
   init_req(IfFalse,left);
   init_req(IfTrue,right);
 }
fsl_shw_return_t fsl_shw_add_entropy(
                                fsl_shw_uco_t* user_ctx,
                                uint32_t length,
                                uint8_t* data)
{
    fsl_shw_return_t ret = FSL_RETURN_ERROR_S;

    /* perform a sanity check on the uco */
    ret = validate_uco(user_ctx);
    if (ret == FSL_RETURN_OK_S) {
        struct add_entropy_req* req = malloc(sizeof(*req));

        if (req == NULL) {
            ret = FSL_RETURN_NO_RESOURCE_S;
        } else {
            init_req(&req->hdr, user_ctx);
            req->size = length;
            req->entropy = data;

            ret = send_req(SHW_USER_REQ_ADD_ENTROPY, &req->hdr, user_ctx);
        }
    }

    return ret;
}
Beispiel #4
0
 FastLockNode(Node *ctrl, Node *oop, Node *box) : CmpNode(oop,box) {
   init_req(0,ctrl);
   init_class_id(Class_FastLock);
   _counters = NULL;
   _rtm_counters = NULL;
   _stack_rtm_counters = NULL;
 }
/* REQ-S2LRD-PINTFC-API-BASIC-RNG-002 */
fsl_shw_return_t fsl_shw_get_random(
                                fsl_shw_uco_t* user_ctx,
                                uint32_t length,
                                uint8_t* data)
{
    fsl_shw_return_t ret = FSL_RETURN_ERROR_S;

    /* perform a sanity check / update uco */
    ret = validate_uco(user_ctx);
    if (ret == FSL_RETURN_OK_S) {
        struct get_random_req* req = malloc(sizeof(*req));

        if (req == NULL) {
            ret = FSL_RETURN_NO_RESOURCE_S;
        } else {

            init_req(&req->hdr, user_ctx);
            req->size = length;
            req->random = data;

            ret = send_req(SHW_USER_REQ_GET_RANDOM, &req->hdr, user_ctx);
        }
    }

    return ret;
}
Beispiel #6
0
 PhiNode( Node *r, const Type *t, const TypePtr* at = NULL,
          const int iid = TypeOopPtr::InstanceTop,
          const int iidx = Compile::AliasIdxTop,
          const int ioffs = Type::OffsetTop )
   : TypeNode(t,r->req()),
     _adr_type(at),
     _inst_id(iid),
     _inst_index(iidx),
     _inst_offset(ioffs)
 {
   init_class_id(Class_Phi);
   init_req(0, r);
   verify_adr_type();
 }
Beispiel #7
0
// 
// The function to handle a client connection
//
void handle_connection(int fd)
{
    http_req req;
    FILE *rx, *tx;

    exit_msg((fd < 0) || (fd > FD_SETSIZE), "bad fd");
    
    // for streams with sockets, need one for read and one for write
    rx = fdopen(fd, "r");
    tx = fdopen(dup(fd), "w");

    init_req(&req);
    http_get_request(rx, &req);
    http_process_request(&req);
    http_response(tx, &req);

    shutdown(fileno(rx), SHUT_RDWR);
    fclose(rx);
    fclose(tx);
    free_req(&req);
    return;
}
//=============================================================================
// Fast-Path Allocation
FastAllocNode::FastAllocNode( Node *kid_node, Node *size_in_bytes, const TypeOopPtr *tp, Node *len ): TypeNode(tp,4) {
    init_req(1,kid_node);
    init_req(2,size_in_bytes);
    init_req(3,len);
}
Beispiel #9
0
 RegionNode( uint required ) : Node(required) {
   init_class_id(Class_Region);
   init_req(0,this);
 }
Beispiel #10
0
 StartNode( Node *root, const TypeTuple *domain ) : MultiNode(2), _domain(domain) {
   init_class_id(Class_Start);
   init_req(0,this);
   init_req(1,root);
 }
Beispiel #11
0
 ConNode( const Type *t ) : TypeNode(t,1) {
   init_req(0, (Node*)Compile::current()->root());
   init_flags(Flag_is_Con);
 }
Beispiel #12
0
 TailCallNode( Node *cntrl, Node *i_o, Node *memory, Node *frameptr, Node *retadr, Node *target, Node *moop )
   : ReturnNode( TypeFunc::Parms+2, cntrl, i_o, memory, frameptr, retadr ) {
   init_req(TypeFunc::Parms, target);
   init_req(TypeFunc::Parms+1, moop);
 }
Beispiel #13
0
 TailJumpNode( Node *cntrl, Node *i_o, Node *memory, Node *frameptr, Node *target, Node *ex_oop)
   : ReturnNode(TypeFunc::Parms+2, cntrl, i_o, memory, frameptr, Compile::current()->top()) {
   init_req(TypeFunc::Parms, target);
   init_req(TypeFunc::Parms+1, ex_oop);
 }
Beispiel #14
0
 VectorNode(Node* n1, const TypeVect* vt) : TypeNode(vt, 2) {
   init_class_id(Class_Vector);
   init_req(1, n1);
 }
 DecodeNarrowPtrNode(Node* value, const Type* type):
   TypeNode(type, 2) {
   init_class_id(Class_DecodeNarrowPtr);
   init_req(0, NULL);
   init_req(1, value);
 }
Beispiel #16
0
 FastUnlockNode(Node *ctrl, Node *oop, Node *box) : CmpNode(oop,box) {
   init_req(0,ctrl);
   init_class_id(Class_FastUnlock);
 }
Beispiel #17
0
 EncodePNode(Node* value, const Type* type):
   TypeNode(type, 2) {
   init_class_id(Class_EncodeP);
   init_req(0, NULL);
   init_req(1, value);
 }
 CMoveNNode( Node *c, Node *bol, Node *left, Node *right, const Type* t ) : CMoveNode(bol,left,right,t) { init_req(Control,c); }
 ConstraintCastNode (Node *n, const Type *t ): TypeNode(t,2) {
   init_class_id(Class_ConstraintCast);
   init_req(1, n);
 }
 ConNode( const Type *t ) : TypeNode(t->remove_speculative(),1) {
   init_req(0, (Node*)Compile::current()->root());
   init_flags(Flag_is_Con);
 }
Beispiel #21
0
 LoopNode( Node *entry, Node *backedge ) : RegionNode(3), _loop_flags(0), _unswitch_count(0) {
   init_class_id(Class_Loop);
   init_req(EntryControl, entry);
   init_req(LoopBackControl, backedge);
 }
Beispiel #22
0
 VectorNode(Node* n1, Node* n2, const TypeVect* vt) : TypeNode(vt, 3) {
   init_class_id(Class_Vector);
   init_req(1, n1);
   init_req(2, n2);
 }
MathExactNode::MathExactNode(Node* ctrl, Node* in1, Node* in2) : MultiNode(3) {
  init_class_id(Class_MathExact);
  init_req(0, ctrl);
  init_req(1, in1);
  init_req(2, in2);
}
 CheckCastPPNode( Node *c, Node *n, const Type *t ) : TypeNode(t,2) {
   init_class_id(Class_CheckCastPP);
   init_req(0, c);
   init_req(1, n);
 }
Beispiel #25
0
 ConvI2LNode(Node *in1, const TypeLong* t = TypeLong::INT)
 : TypeNode(t, 2)
 { init_req(1, in1); }
 PhiNode( Node *r, const Type *t, const TypePtr* at = NULL )
   : TypeNode(t,r->req()), _adr_type(at) {
   init_class_id(Class_Phi);
   init_req(0, r);
   verify_adr_type();
 }