• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Hard 'C' Question

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #11
    Originally posted by d000hg View Post
    Assembly is a little more past it than C. What are you doing that can't be achieved using intrinsics BTW? The only time ASM seems needed these days is in SIMD, where you can get massive improvements.
    Intrinsics suck arse - I tried them first but found bug in VS 2008 that was causing wrong calculations, confirmed by Microsoft, and yes I was trying to use new SSE4.2 SIMD...

    Comment


      #12
      Oh, I thought you meant standard 64-bit ASM which seemed weird. If you are doing parallel data processing then ASM makes sense, it's really interesting.
      Have you tried the Intel compiler?
      Originally posted by MaryPoppins
      I'd still not breastfeed a nazi
      Originally posted by vetran
      Urine is quite nourishing

      Comment


        #13
        Originally posted by d000hg View Post
        Assembly is a little more past it than C. What are you doing that can't be achieved using intrinsics BTW? The only time ASM seems needed these days is in SIMD, where you can get massive improvements.
        From my stash of quotes:

        Originally posted by Somewhere on da Web
        Watching discussions of string and macro handling in C. And complaints. C is supposed to be assembler. If that bugs you, use something else.
        Behold the warranty -- the bold print giveth and the fine print taketh away.

        Comment


          #14
          Originally posted by d000hg View Post
          Oh, I thought you meant standard 64-bit ASM which seemed weird. If you are doing parallel data processing then ASM makes sense, it's really interesting.
          Have you tried the Intel compiler?
          Yes Intel compiler is the best. Visual Studio C++ dropped support for inline asm in 64-bit compiles

          Comment


            #15
            Err .... you create a U/m include file for your struct.

            There it might not include your LIST_ENTRY field, you just have to
            cope with this in the K/M data copy routines.

            Or, you can cut and paste the LIST_ENTRY definition in to the U/m include file.

            Or create a dummy version of your own devising using PVOID.

            Basic C programming.

            Comment


              #16
              "so .Netters need not apply" - meaning we have no knowledge of machine code, assembly, instruction sets, direct mode addressing, indirection, bitshift etc? kids stuff!!

              Comment


                #17
                Originally posted by scotspine View Post
                Err .... you create a U/m include file for your struct.

                There it might not include your LIST_ENTRY field, you just have to
                cope with this in the K/M data copy routines.

                Or, you can cut and paste the LIST_ENTRY definition in to the U/m include file.

                Or create a dummy version of your own devising using PVOID.

                Basic C programming.
                Sharing memory between user mode and kernel mode is basic C programming?
                Knock first as I might be balancing my chakras.

                Comment


                  #18
                  Originally posted by scotspine View Post
                  "so .Netters need not apply" - meaning we have no knowledge of machine code, assembly, instruction sets, direct mode addressing, indirection, bitshift etc? kids stuff!!
                  pretty much, yes.

                  HTH
                  Knock first as I might be balancing my chakras.

                  Comment


                    #19
                    Still not working out for me.

                    I have a structure in Kernel mode defined as

                    NET_BUFFER_LIST*

                    now my user mode app does not know what a NET_BUFFER_LIST is so I declared it as PVOID.

                    All other members in the struct after the NET_BUFFER_LIST has garbled data.

                    So the question is

                    What's the difference in size between a PVOID and a NET_BUFFER_LIST*

                    Nothing shirley as they're both pointers?
                    Knock first as I might be balancing my chakras.

                    Comment


                      #20
                      Pointers can be different lengths from one program to another. It depends on how you have compiled them.

                      Have you checked what byte alignment is in place? I seem to recall that intel chips allow different policies on demand. Been a while so the up-to-date experts such as scots could correct me on this one.

                      Comment

                      Working...
                      X